//===----------------------------------------------------------------------===//
//
// This source file is part of the Soto for AWS open source project
//
// Copyright (c) 2017-2024 the Soto project authors
// Licensed under Apache License v2.0
//
// See LICENSE.txt for license information
// See CONTRIBUTORS.txt for the list of Soto project authors
//
// SPDX-License-Identifier: Apache-2.0
//
//===----------------------------------------------------------------------===//

// THIS FILE IS AUTOMATICALLY GENERATED by https://github.com/soto-project/soto-codegenerator.
// DO NOT EDIT.

#if canImport(FoundationEssentials)
import FoundationEssentials
#else
import Foundation
#endif
@_spi(SotoInternal) import SotoCore

extension CognitoIdentityProvider {
    // MARK: Enums

    public enum AccountTakeoverEventActionType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case block = "BLOCK"
        case mfaIfConfigured = "MFA_IF_CONFIGURED"
        case mfaRequired = "MFA_REQUIRED"
        case noAction = "NO_ACTION"
        public var description: String { return self.rawValue }
    }

    public enum AdvancedSecurityEnabledModeType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case audit = "AUDIT"
        case enforced = "ENFORCED"
        public var description: String { return self.rawValue }
    }

    public enum AdvancedSecurityModeType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case audit = "AUDIT"
        case enforced = "ENFORCED"
        case off = "OFF"
        public var description: String { return self.rawValue }
    }

    public enum AliasAttributeType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case email = "email"
        case phoneNumber = "phone_number"
        case preferredUsername = "preferred_username"
        public var description: String { return self.rawValue }
    }

    public enum AssetCategoryType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case authAppGraphic = "AUTH_APP_GRAPHIC"
        case emailGraphic = "EMAIL_GRAPHIC"
        case faviconIco = "FAVICON_ICO"
        case faviconSvg = "FAVICON_SVG"
        case formBackground = "FORM_BACKGROUND"
        case formLogo = "FORM_LOGO"
        case idpButtonIcon = "IDP_BUTTON_ICON"
        case pageBackground = "PAGE_BACKGROUND"
        case pageFooterBackground = "PAGE_FOOTER_BACKGROUND"
        case pageFooterLogo = "PAGE_FOOTER_LOGO"
        case pageHeaderBackground = "PAGE_HEADER_BACKGROUND"
        case pageHeaderLogo = "PAGE_HEADER_LOGO"
        case passkeyGraphic = "PASSKEY_GRAPHIC"
        case passwordGraphic = "PASSWORD_GRAPHIC"
        case smsGraphic = "SMS_GRAPHIC"
        public var description: String { return self.rawValue }
    }

    public enum AssetExtensionType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case ico = "ICO"
        case jpeg = "JPEG"
        case png = "PNG"
        case svg = "SVG"
        case webp = "WEBP"
        public var description: String { return self.rawValue }
    }

    public enum AttributeDataType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case boolean = "Boolean"
        case datetime = "DateTime"
        case number = "Number"
        case string = "String"
        public var description: String { return self.rawValue }
    }

    public enum AuthFactorType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case emailOtp = "EMAIL_OTP"
        case password = "PASSWORD"
        case smsOtp = "SMS_OTP"
        case webAuthn = "WEB_AUTHN"
        public var description: String { return self.rawValue }
    }

    public enum AuthFlowType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case adminNoSrpAuth = "ADMIN_NO_SRP_AUTH"
        case adminUserPasswordAuth = "ADMIN_USER_PASSWORD_AUTH"
        case customAuth = "CUSTOM_AUTH"
        case refreshToken = "REFRESH_TOKEN"
        case refreshTokenAuth = "REFRESH_TOKEN_AUTH"
        case userAuth = "USER_AUTH"
        case userPasswordAuth = "USER_PASSWORD_AUTH"
        case userSrpAuth = "USER_SRP_AUTH"
        public var description: String { return self.rawValue }
    }

    public enum ChallengeName: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case mfa = "Mfa"
        case password = "Password"
        public var description: String { return self.rawValue }
    }

    public enum ChallengeNameType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case adminNoSrpAuth = "ADMIN_NO_SRP_AUTH"
        case customChallenge = "CUSTOM_CHALLENGE"
        case devicePasswordVerifier = "DEVICE_PASSWORD_VERIFIER"
        case deviceSrpAuth = "DEVICE_SRP_AUTH"
        case emailOtp = "EMAIL_OTP"
        case mfaSetup = "MFA_SETUP"
        case newPasswordRequired = "NEW_PASSWORD_REQUIRED"
        case password = "PASSWORD"
        case passwordSrp = "PASSWORD_SRP"
        case passwordVerifier = "PASSWORD_VERIFIER"
        case selectChallenge = "SELECT_CHALLENGE"
        case selectMfaType = "SELECT_MFA_TYPE"
        case smsMfa = "SMS_MFA"
        case smsOtp = "SMS_OTP"
        case softwareTokenMfa = "SOFTWARE_TOKEN_MFA"
        case webAuthn = "WEB_AUTHN"
        public var description: String { return self.rawValue }
    }

    public enum ChallengeResponse: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case failure = "Failure"
        case success = "Success"
        public var description: String { return self.rawValue }
    }

    public enum ColorSchemeModeType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case dark = "DARK"
        case dynamic = "DYNAMIC"
        case light = "LIGHT"
        public var description: String { return self.rawValue }
    }

    public enum CompromisedCredentialsEventActionType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case block = "BLOCK"
        case noAction = "NO_ACTION"
        public var description: String { return self.rawValue }
    }

    public enum CustomEmailSenderLambdaVersionType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case v10 = "V1_0"
        public var description: String { return self.rawValue }
    }

    public enum CustomSMSSenderLambdaVersionType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case v10 = "V1_0"
        public var description: String { return self.rawValue }
    }

    public enum DefaultEmailOptionType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case confirmWithCode = "CONFIRM_WITH_CODE"
        case confirmWithLink = "CONFIRM_WITH_LINK"
        public var description: String { return self.rawValue }
    }

    public enum DeletionProtectionType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case active = "ACTIVE"
        case inactive = "INACTIVE"
        public var description: String { return self.rawValue }
    }

    public enum DeliveryMediumType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case email = "EMAIL"
        case sms = "SMS"
        public var description: String { return self.rawValue }
    }

    public enum DeviceRememberedStatusType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case notRemembered = "not_remembered"
        case remembered = "remembered"
        public var description: String { return self.rawValue }
    }

    public enum DomainStatusType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case active = "ACTIVE"
        case creating = "CREATING"
        case deleting = "DELETING"
        case failed = "FAILED"
        case updating = "UPDATING"
        public var description: String { return self.rawValue }
    }

    public enum EmailSendingAccountType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case cognitoDefault = "COGNITO_DEFAULT"
        case developer = "DEVELOPER"
        public var description: String { return self.rawValue }
    }

    public enum EventFilterType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case passwordChange = "PASSWORD_CHANGE"
        case signIn = "SIGN_IN"
        case signUp = "SIGN_UP"
        public var description: String { return self.rawValue }
    }

    public enum EventResponseType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case fail = "Fail"
        case inProgress = "InProgress"
        case pass = "Pass"
        public var description: String { return self.rawValue }
    }

    public enum EventSourceName: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case userAuthEvents = "userAuthEvents"
        case userNotification = "userNotification"
        public var description: String { return self.rawValue }
    }

    public enum EventType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case forgotPassword = "ForgotPassword"
        case passwordChange = "PasswordChange"
        case resendCode = "ResendCode"
        case signIn = "SignIn"
        case signUp = "SignUp"
        public var description: String { return self.rawValue }
    }

    public enum ExplicitAuthFlowsType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case adminNoSrpAuth = "ADMIN_NO_SRP_AUTH"
        case allowAdminUserPasswordAuth = "ALLOW_ADMIN_USER_PASSWORD_AUTH"
        case allowCustomAuth = "ALLOW_CUSTOM_AUTH"
        case allowRefreshTokenAuth = "ALLOW_REFRESH_TOKEN_AUTH"
        case allowUserAuth = "ALLOW_USER_AUTH"
        case allowUserPasswordAuth = "ALLOW_USER_PASSWORD_AUTH"
        case allowUserSrpAuth = "ALLOW_USER_SRP_AUTH"
        case customAuthFlowOnly = "CUSTOM_AUTH_FLOW_ONLY"
        case userPasswordAuth = "USER_PASSWORD_AUTH"
        public var description: String { return self.rawValue }
    }

    public enum FeatureType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case disabled = "DISABLED"
        case enabled = "ENABLED"
        public var description: String { return self.rawValue }
    }

    public enum FeedbackValueType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case invalid = "Invalid"
        case valid = "Valid"
        public var description: String { return self.rawValue }
    }

    public enum IdentityProviderTypeType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case facebook = "Facebook"
        case google = "Google"
        case loginWithAmazon = "LoginWithAmazon"
        case oidc = "OIDC"
        case saml = "SAML"
        case signInWithApple = "SignInWithApple"
        public var description: String { return self.rawValue }
    }

    public enum LogLevel: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case error = "ERROR"
        case info = "INFO"
        public var description: String { return self.rawValue }
    }

    public enum MessageActionType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case resend = "RESEND"
        case suppress = "SUPPRESS"
        public var description: String { return self.rawValue }
    }

    public enum OAuthFlowType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case clientCredentials = "client_credentials"
        case code = "code"
        case implicit = "implicit"
        public var description: String { return self.rawValue }
    }

    public enum PreTokenGenerationLambdaVersionType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case v10 = "V1_0"
        case v20 = "V2_0"
        case v30 = "V3_0"
        public var description: String { return self.rawValue }
    }

    public enum PreventUserExistenceErrorTypes: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case enabled = "ENABLED"
        case legacy = "LEGACY"
        public var description: String { return self.rawValue }
    }

    public enum RecoveryOptionNameType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case adminOnly = "admin_only"
        case verifiedEmail = "verified_email"
        case verifiedPhoneNumber = "verified_phone_number"
        public var description: String { return self.rawValue }
    }

    public enum RiskDecisionType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case accountTakeover = "AccountTakeover"
        case block = "Block"
        case noRisk = "NoRisk"
        public var description: String { return self.rawValue }
    }

    public enum RiskLevelType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case high = "High"
        case low = "Low"
        case medium = "Medium"
        public var description: String { return self.rawValue }
    }

    public enum StatusType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case disabled = "Disabled"
        case enabled = "Enabled"
        public var description: String { return self.rawValue }
    }

    public enum TermsEnforcementType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case none = "NONE"
        public var description: String { return self.rawValue }
    }

    public enum TermsSourceType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case link = "LINK"
        public var description: String { return self.rawValue }
    }

    public enum TimeUnitsType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case days = "days"
        case hours = "hours"
        case minutes = "minutes"
        case seconds = "seconds"
        public var description: String { return self.rawValue }
    }

    public enum UserImportJobStatusType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case created = "Created"
        case expired = "Expired"
        case failed = "Failed"
        case inProgress = "InProgress"
        case pending = "Pending"
        case stopped = "Stopped"
        case stopping = "Stopping"
        case succeeded = "Succeeded"
        public var description: String { return self.rawValue }
    }

    public enum UserPoolMfaType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case off = "OFF"
        case on = "ON"
        case optional = "OPTIONAL"
        public var description: String { return self.rawValue }
    }

    public enum UserPoolTierType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case essentials = "ESSENTIALS"
        case lite = "LITE"
        case plus = "PLUS"
        public var description: String { return self.rawValue }
    }

    public enum UserStatusType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case archived = "ARCHIVED"
        case compromised = "COMPROMISED"
        case confirmed = "CONFIRMED"
        case externalProvider = "EXTERNAL_PROVIDER"
        case forceChangePassword = "FORCE_CHANGE_PASSWORD"
        case resetRequired = "RESET_REQUIRED"
        case unconfirmed = "UNCONFIRMED"
        case unknown = "UNKNOWN"
        public var description: String { return self.rawValue }
    }

    public enum UserVerificationType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case preferred = "preferred"
        case required = "required"
        public var description: String { return self.rawValue }
    }

    public enum UsernameAttributeType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case email = "email"
        case phoneNumber = "phone_number"
        public var description: String { return self.rawValue }
    }

    public enum VerifiedAttributeType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case email = "email"
        case phoneNumber = "phone_number"
        public var description: String { return self.rawValue }
    }

    public enum VerifySoftwareTokenResponseType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case error = "ERROR"
        case success = "SUCCESS"
        public var description: String { return self.rawValue }
    }

    // MARK: Shapes

    public struct AccountRecoverySettingType: AWSEncodableShape & AWSDecodableShape {
        /// The list of options and priorities for user message delivery in forgot-password operations. Sets or displays user pool preferences for email or SMS message priority, whether users should fall back to a second delivery method, and whether passwords should only be reset by administrators.
        public let recoveryMechanisms: [RecoveryOptionType]?

        @inlinable
        public init(recoveryMechanisms: [RecoveryOptionType]? = nil) {
            self.recoveryMechanisms = recoveryMechanisms
        }

        public func validate(name: String) throws {
            try self.recoveryMechanisms?.forEach {
                try $0.validate(name: "\(name).recoveryMechanisms[]")
            }
            try self.validate(self.recoveryMechanisms, name: "recoveryMechanisms", parent: name, max: 2)
            try self.validate(self.recoveryMechanisms, name: "recoveryMechanisms", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case recoveryMechanisms = "RecoveryMechanisms"
        }
    }

    public struct AccountTakeoverActionType: AWSEncodableShape & AWSDecodableShape {
        /// The action to take for the attempted account takeover action for the associated risk level. Valid values are as follows:    BLOCK: Block the request.    MFA_IF_CONFIGURED: Present an MFA challenge if possible. MFA is possible if the user pool has active MFA methods that the user can set up. For example, if the user pool only supports SMS message MFA but the user doesn't have a phone number attribute, MFA setup isn't possible. If MFA setup isn't possible, allow the request.    MFA_REQUIRED: Present an MFA challenge if possible. Block the request if a user hasn't set up MFA. To sign in with required MFA, users must have an email address or phone number attribute, or a registered TOTP factor.    NO_ACTION: Take no action. Permit sign-in.
        public let eventAction: AccountTakeoverEventActionType
        /// Determines whether Amazon Cognito sends a user a notification message when your user pools assesses a user's session at the associated risk level.
        public let notify: Bool

        @inlinable
        public init(eventAction: AccountTakeoverEventActionType, notify: Bool) {
            self.eventAction = eventAction
            self.notify = notify
        }

        private enum CodingKeys: String, CodingKey {
            case eventAction = "EventAction"
            case notify = "Notify"
        }
    }

    public struct AccountTakeoverActionsType: AWSEncodableShape & AWSDecodableShape {
        /// The action that you assign to a high-risk assessment by threat protection.
        public let highAction: AccountTakeoverActionType?
        /// The action that you assign to a low-risk assessment by threat protection.
        public let lowAction: AccountTakeoverActionType?
        /// The action that you assign to a medium-risk assessment by threat protection.
        public let mediumAction: AccountTakeoverActionType?

        @inlinable
        public init(highAction: AccountTakeoverActionType? = nil, lowAction: AccountTakeoverActionType? = nil, mediumAction: AccountTakeoverActionType? = nil) {
            self.highAction = highAction
            self.lowAction = lowAction
            self.mediumAction = mediumAction
        }

        private enum CodingKeys: String, CodingKey {
            case highAction = "HighAction"
            case lowAction = "LowAction"
            case mediumAction = "MediumAction"
        }
    }

    public struct AccountTakeoverRiskConfigurationType: AWSEncodableShape & AWSDecodableShape {
        /// A list of account-takeover actions for each level of risk that Amazon Cognito might assess with threat protection.
        public let actions: AccountTakeoverActionsType
        /// The settings for composing and sending an email message when threat protection assesses a risk level with adaptive authentication. When you choose to notify users in AccountTakeoverRiskConfiguration, Amazon Cognito sends an email message using the method and template that you set with this data type.
        public let notifyConfiguration: NotifyConfigurationType?

        @inlinable
        public init(actions: AccountTakeoverActionsType, notifyConfiguration: NotifyConfigurationType? = nil) {
            self.actions = actions
            self.notifyConfiguration = notifyConfiguration
        }

        public func validate(name: String) throws {
            try self.notifyConfiguration?.validate(name: "\(name).notifyConfiguration")
        }

        private enum CodingKeys: String, CodingKey {
            case actions = "Actions"
            case notifyConfiguration = "NotifyConfiguration"
        }
    }

    public struct AddCustomAttributesRequest: AWSEncodableShape {
        /// An array of custom attribute names and other properties. Sets the following characteristics:  AttributeDataType  The expected data type. Can be a string, a number, a date and time, or a boolean.  Mutable  If true, you can grant app clients write access to the attribute value. If false, the attribute value can only be set up on sign-up or administrator creation of users.  Name  The attribute name. For an attribute like custom:myAttribute, enter myAttribute for this field.  Required  When true, users who sign up or are created must set a value for the attribute.  NumberAttributeConstraints  The minimum and maximum length of accepted values for a Number-type attribute.  StringAttributeConstraints  The minimum and maximum length of accepted values for a String-type attribute.  DeveloperOnlyAttribute  This legacy option creates an attribute with a dev: prefix. You can only set the value of a developer-only attribute with administrative IAM credentials.
        public let customAttributes: [SchemaAttributeType]
        /// The ID of the user pool where you want to add custom attributes.
        public let userPoolId: String

        @inlinable
        public init(customAttributes: [SchemaAttributeType], userPoolId: String) {
            self.customAttributes = customAttributes
            self.userPoolId = userPoolId
        }

        public func validate(name: String) throws {
            try self.customAttributes.forEach {
                try $0.validate(name: "\(name).customAttributes[]")
            }
            try self.validate(self.customAttributes, name: "customAttributes", parent: name, max: 25)
            try self.validate(self.customAttributes, name: "customAttributes", parent: name, min: 1)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, max: 55)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, min: 1)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, pattern: "^[\\w-]+_[0-9a-zA-Z]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case customAttributes = "CustomAttributes"
            case userPoolId = "UserPoolId"
        }
    }

    public struct AddCustomAttributesResponse: AWSDecodableShape {
        public init() {}
    }

    public struct AdminAddUserToGroupRequest: AWSEncodableShape {
        /// The name of the group that you want to add your user to.
        public let groupName: String
        /// The name of the user that you want to query or modify. The value of this parameter is typically your user's username, but it can be any of their alias attributes. If username isn't an alias attribute in your user pool, this value must be the sub of a local user or the username of a user from a third-party IdP.
        public let username: String
        /// The ID of the user pool that contains the group that you want to add the user to.
        public let userPoolId: String

        @inlinable
        public init(groupName: String, username: String, userPoolId: String) {
            self.groupName = groupName
            self.username = username
            self.userPoolId = userPoolId
        }

        public func validate(name: String) throws {
            try self.validate(self.groupName, name: "groupName", parent: name, max: 128)
            try self.validate(self.groupName, name: "groupName", parent: name, min: 1)
            try self.validate(self.groupName, name: "groupName", parent: name, pattern: "^[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}]+$")
            try self.validate(self.username, name: "username", parent: name, max: 128)
            try self.validate(self.username, name: "username", parent: name, min: 1)
            try self.validate(self.username, name: "username", parent: name, pattern: "^[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}]+$")
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, max: 55)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, min: 1)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, pattern: "^[\\w-]+_[0-9a-zA-Z]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case groupName = "GroupName"
            case username = "Username"
            case userPoolId = "UserPoolId"
        }
    }

    public struct AdminConfirmSignUpRequest: AWSEncodableShape {
        /// A map of custom key-value pairs that you can provide as input for any custom workflows that this action triggers. If your user pool configuration includes triggers, the AdminConfirmSignUp API action invokes the Lambda function that is specified for the post confirmation trigger. When Amazon Cognito invokes this function, it passes a JSON payload, which the function receives as input. In this payload, the clientMetadata attribute provides the data that you assigned to the ClientMetadata parameter in your AdminConfirmSignUp request. In your function code in Lambda, you can process the ClientMetadata value to enhance your workflow for your specific needs. For more information, see
        /// Using Lambda triggers in the Amazon Cognito Developer Guide.  When you use the ClientMetadata parameter, note that Amazon Cognito won't do the following:   Store the ClientMetadata value. This data is available only to Lambda triggers that are assigned to a user pool to support custom workflows. If your user pool configuration doesn't include triggers, the ClientMetadata parameter serves no purpose.   Validate the ClientMetadata value.   Encrypt the ClientMetadata value. Don't send sensitive information in this parameter.
        public let clientMetadata: [String: String]?
        /// The name of the user that you want to query or modify. The value of this parameter is typically your user's username, but it can be any of their alias attributes. If username isn't an alias attribute in your user pool, this value must be the sub of a local user or the username of a user from a third-party IdP.
        public let username: String
        /// The ID of the user pool where you want to confirm a user's sign-up request.
        public let userPoolId: String

        @inlinable
        public init(clientMetadata: [String: String]? = nil, username: String, userPoolId: String) {
            self.clientMetadata = clientMetadata
            self.username = username
            self.userPoolId = userPoolId
        }

        public func validate(name: String) throws {
            try self.clientMetadata?.forEach {
                try validate($0.key, name: "clientMetadata.key", parent: name, max: 131072)
                try validate($0.value, name: "clientMetadata[\"\($0.key)\"]", parent: name, max: 131072)
            }
            try self.validate(self.username, name: "username", parent: name, max: 128)
            try self.validate(self.username, name: "username", parent: name, min: 1)
            try self.validate(self.username, name: "username", parent: name, pattern: "^[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}]+$")
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, max: 55)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, min: 1)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, pattern: "^[\\w-]+_[0-9a-zA-Z]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case clientMetadata = "ClientMetadata"
            case username = "Username"
            case userPoolId = "UserPoolId"
        }
    }

    public struct AdminConfirmSignUpResponse: AWSDecodableShape {
        public init() {}
    }

    public struct AdminCreateUserConfigType: AWSEncodableShape & AWSDecodableShape {
        /// The setting for allowing self-service sign-up. When true, only administrators can create new user profiles. When false, users can register themselves and create a new user profile with the SignUp operation.
        public let allowAdminCreateUserOnly: Bool?
        /// The template for the welcome message to new users. This template must include the {####} temporary password placeholder if you are creating users with passwords. If your users don't have passwords, you can omit the placeholder. See also Customizing User Invitation Messages.
        public let inviteMessageTemplate: MessageTemplateType?
        /// This parameter is no longer in use. The password expiration limit in days for administrator-created users. When this time expires, the user can't sign in with their temporary password. To reset the account after that time limit, you must call AdminCreateUser again, specifying RESEND for the MessageAction parameter.  The default value for this parameter is 7.
        public let unusedAccountValidityDays: Int?

        @inlinable
        public init(allowAdminCreateUserOnly: Bool? = nil, inviteMessageTemplate: MessageTemplateType? = nil, unusedAccountValidityDays: Int? = nil) {
            self.allowAdminCreateUserOnly = allowAdminCreateUserOnly
            self.inviteMessageTemplate = inviteMessageTemplate
            self.unusedAccountValidityDays = unusedAccountValidityDays
        }

        public func validate(name: String) throws {
            try self.inviteMessageTemplate?.validate(name: "\(name).inviteMessageTemplate")
            try self.validate(self.unusedAccountValidityDays, name: "unusedAccountValidityDays", parent: name, max: 365)
            try self.validate(self.unusedAccountValidityDays, name: "unusedAccountValidityDays", parent: name, min: 0)
        }

        private enum CodingKeys: String, CodingKey {
            case allowAdminCreateUserOnly = "AllowAdminCreateUserOnly"
            case inviteMessageTemplate = "InviteMessageTemplate"
            case unusedAccountValidityDays = "UnusedAccountValidityDays"
        }
    }

    public struct AdminCreateUserRequest: AWSEncodableShape {
        /// A map of custom key-value pairs that you can provide as input for any custom workflows that this action triggers. You create custom workflows by assigning Lambda functions to user pool triggers. When you use the AdminCreateUser API action, Amazon Cognito invokes the function that is assigned to the pre sign-up trigger. When Amazon Cognito invokes this function, it passes a JSON payload, which the function receives as input. This payload contains a ClientMetadata attribute, which provides the data that you assigned to the ClientMetadata parameter in your AdminCreateUser request. In your function code in Lambda, you can process the clientMetadata value to enhance your workflow for your specific needs. For more information, see
        /// Using Lambda triggers in the Amazon Cognito Developer Guide.  When you use the ClientMetadata parameter, note that Amazon Cognito won't do the following:   Store the ClientMetadata value. This data is available only to Lambda triggers that are assigned to a user pool to support custom workflows. If your user pool configuration doesn't include triggers, the ClientMetadata parameter serves no purpose.   Validate the ClientMetadata value.   Encrypt the ClientMetadata value. Don't send sensitive information in this parameter.
        public let clientMetadata: [String: String]?
        /// Specify EMAIL if email will be used to send the welcome message. Specify SMS if the phone number will be used. The default value is SMS. You can specify more than one value.
        public let desiredDeliveryMediums: [DeliveryMediumType]?
        /// This parameter is used only if the phone_number_verified or email_verified attribute is set to True. Otherwise, it is ignored. If this parameter is set to True and the phone number or email address specified in the UserAttributes parameter already exists as an alias with a different user, this request migrates the alias from the previous user to the newly-created user. The previous user will no longer be able to log in using that alias. If this parameter is set to False, the API throws an AliasExistsException error if the alias already exists. The default value is False.
        public let forceAliasCreation: Bool?
        /// Set to RESEND to resend the invitation message to a user that already exists, and to reset the temporary-password duration with a new temporary password. Set to SUPPRESS to suppress sending the message. You can specify only one value.
        public let messageAction: MessageActionType?
        /// The user's temporary password. This password must conform to the password policy that you specified when you created the user pool. The exception to the requirement for a password is when your user pool supports passwordless sign-in with email or SMS OTPs. To create a user with no password, omit this parameter or submit a blank value. You can only create a passwordless user when passwordless sign-in is available. The temporary password is valid only once. To complete the Admin Create User flow, the user must enter the temporary password in the sign-in page, along with a new password to be used in all future sign-ins. If you don't specify a value, Amazon Cognito generates one for you unless you have passwordless options active for your user pool. The temporary password can only be used until the user account expiration limit that you set for your user pool. To reset the account after that time limit, you must call AdminCreateUser again and specify RESEND for the MessageAction parameter.
        public let temporaryPassword: String?
        /// An array of name-value pairs that contain user attributes and attribute values to be set for the user to be created. You can create a user without specifying any attributes other than Username. However, any attributes that you specify as required (when creating a user pool or in the Attributes tab of the console) either you should supply (in your call to AdminCreateUser) or the user should supply (when they sign up in response to your welcome message). For custom attributes, you must prepend the custom: prefix to the attribute name. To send a message inviting the user to sign up, you must specify the user's email address or phone number. You can do this in your call to AdminCreateUser or in the Users tab of the Amazon Cognito console for managing your user pools. You must also provide an email address or phone number when you expect the user to do passwordless sign-in with an email or SMS OTP. These attributes must be provided when passwordless options are the only available, or when you don't submit a TemporaryPassword. In your AdminCreateUser request, you can set the email_verified and phone_number_verified attributes to true. The following conditions apply:  email  The email address where you want the user to receive their confirmation code and username. You must provide a value for email when you want to set email_verified to true, or if you set EMAIL in the DesiredDeliveryMediums parameter.  phone_number  The phone number where you want the user to receive their confirmation code and username. You must provide a value for phone_number when you want to set phone_number_verified to true, or if you set SMS in the DesiredDeliveryMediums parameter.
        public let userAttributes: [AttributeType]?
        /// The value that you want to set as the username sign-in attribute. The following conditions apply to the username parameter.   The username can't be a duplicate of another username in the same user pool.   You can't change the value of a username after you create it.   You can only provide a value if usernames are a valid sign-in attribute for your user pool. If your user pool only supports phone numbers or email addresses as sign-in attributes, Amazon Cognito automatically generates a username value. For more information, see Customizing sign-in attributes.
        public let username: String
        /// The ID of the user pool where you want to create a user.
        public let userPoolId: String
        /// Temporary user attributes that contribute to the outcomes of your pre sign-up Lambda trigger. This set of key-value pairs are for custom validation of information that you  collect from your users but don't need to retain. Your Lambda function can analyze this additional data and act on it. Your function can automatically confirm and verify select users or perform external API operations  like logging user attributes and validation data to Amazon CloudWatch Logs. For more information about the pre sign-up Lambda trigger, see Pre sign-up Lambda trigger.
        public let validationData: [AttributeType]?

        @inlinable
        public init(clientMetadata: [String: String]? = nil, desiredDeliveryMediums: [DeliveryMediumType]? = nil, forceAliasCreation: Bool? = nil, messageAction: MessageActionType? = nil, temporaryPassword: String? = nil, userAttributes: [AttributeType]? = nil, username: String, userPoolId: String, validationData: [AttributeType]? = nil) {
            self.clientMetadata = clientMetadata
            self.desiredDeliveryMediums = desiredDeliveryMediums
            self.forceAliasCreation = forceAliasCreation
            self.messageAction = messageAction
            self.temporaryPassword = temporaryPassword
            self.userAttributes = userAttributes
            self.username = username
            self.userPoolId = userPoolId
            self.validationData = validationData
        }

        public func validate(name: String) throws {
            try self.clientMetadata?.forEach {
                try validate($0.key, name: "clientMetadata.key", parent: name, max: 131072)
                try validate($0.value, name: "clientMetadata[\"\($0.key)\"]", parent: name, max: 131072)
            }
            try self.validate(self.temporaryPassword, name: "temporaryPassword", parent: name, max: 256)
            try self.validate(self.temporaryPassword, name: "temporaryPassword", parent: name, pattern: "^[\\S]+$")
            try self.userAttributes?.forEach {
                try $0.validate(name: "\(name).userAttributes[]")
            }
            try self.validate(self.username, name: "username", parent: name, max: 128)
            try self.validate(self.username, name: "username", parent: name, min: 1)
            try self.validate(self.username, name: "username", parent: name, pattern: "^[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}]+$")
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, max: 55)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, min: 1)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, pattern: "^[\\w-]+_[0-9a-zA-Z]+$")
            try self.validationData?.forEach {
                try $0.validate(name: "\(name).validationData[]")
            }
        }

        private enum CodingKeys: String, CodingKey {
            case clientMetadata = "ClientMetadata"
            case desiredDeliveryMediums = "DesiredDeliveryMediums"
            case forceAliasCreation = "ForceAliasCreation"
            case messageAction = "MessageAction"
            case temporaryPassword = "TemporaryPassword"
            case userAttributes = "UserAttributes"
            case username = "Username"
            case userPoolId = "UserPoolId"
            case validationData = "ValidationData"
        }
    }

    public struct AdminCreateUserResponse: AWSDecodableShape {
        /// The new user's profile details.
        public let user: UserType?

        @inlinable
        public init(user: UserType? = nil) {
            self.user = user
        }

        private enum CodingKeys: String, CodingKey {
            case user = "User"
        }
    }

    public struct AdminDeleteUserAttributesRequest: AWSEncodableShape {
        /// An array of strings representing the user attribute names you want to delete. For custom attributes, you must prepend the custom: prefix to the attribute name.
        public let userAttributeNames: [String]
        /// The name of the user that you want to query or modify. The value of this parameter is typically your user's username, but it can be any of their alias attributes. If username isn't an alias attribute in your user pool, this value must be the sub of a local user or the username of a user from a third-party IdP.
        public let username: String
        /// The ID of the user pool where you want to delete user attributes.
        public let userPoolId: String

        @inlinable
        public init(userAttributeNames: [String], username: String, userPoolId: String) {
            self.userAttributeNames = userAttributeNames
            self.username = username
            self.userPoolId = userPoolId
        }

        public func validate(name: String) throws {
            try self.userAttributeNames.forEach {
                try validate($0, name: "userAttributeNames[]", parent: name, max: 32)
                try validate($0, name: "userAttributeNames[]", parent: name, min: 1)
                try validate($0, name: "userAttributeNames[]", parent: name, pattern: "^[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}]+$")
            }
            try self.validate(self.username, name: "username", parent: name, max: 128)
            try self.validate(self.username, name: "username", parent: name, min: 1)
            try self.validate(self.username, name: "username", parent: name, pattern: "^[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}]+$")
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, max: 55)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, min: 1)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, pattern: "^[\\w-]+_[0-9a-zA-Z]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case userAttributeNames = "UserAttributeNames"
            case username = "Username"
            case userPoolId = "UserPoolId"
        }
    }

    public struct AdminDeleteUserAttributesResponse: AWSDecodableShape {
        public init() {}
    }

    public struct AdminDeleteUserRequest: AWSEncodableShape {
        /// The name of the user that you want to query or modify. The value of this parameter is typically your user's username, but it can be any of their alias attributes. If username isn't an alias attribute in your user pool, this value must be the sub of a local user or the username of a user from a third-party IdP.
        public let username: String
        /// The ID of the user pool where you want to delete the user.
        public let userPoolId: String

        @inlinable
        public init(username: String, userPoolId: String) {
            self.username = username
            self.userPoolId = userPoolId
        }

        public func validate(name: String) throws {
            try self.validate(self.username, name: "username", parent: name, max: 128)
            try self.validate(self.username, name: "username", parent: name, min: 1)
            try self.validate(self.username, name: "username", parent: name, pattern: "^[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}]+$")
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, max: 55)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, min: 1)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, pattern: "^[\\w-]+_[0-9a-zA-Z]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case username = "Username"
            case userPoolId = "UserPoolId"
        }
    }

    public struct AdminDisableProviderForUserRequest: AWSEncodableShape {
        /// The user profile that you want to delete a linked identity from.
        public let user: ProviderUserIdentifierType
        /// The ID of the user pool where you want to delete the user's linked identities.
        public let userPoolId: String

        @inlinable
        public init(user: ProviderUserIdentifierType, userPoolId: String) {
            self.user = user
            self.userPoolId = userPoolId
        }

        public func validate(name: String) throws {
            try self.user.validate(name: "\(name).user")
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, max: 131072)
        }

        private enum CodingKeys: String, CodingKey {
            case user = "User"
            case userPoolId = "UserPoolId"
        }
    }

    public struct AdminDisableProviderForUserResponse: AWSDecodableShape {
        public init() {}
    }

    public struct AdminDisableUserRequest: AWSEncodableShape {
        /// The name of the user that you want to query or modify. The value of this parameter is typically your user's username, but it can be any of their alias attributes. If username isn't an alias attribute in your user pool, this value must be the sub of a local user or the username of a user from a third-party IdP.
        public let username: String
        /// The ID of the user pool where you want to disable the user.
        public let userPoolId: String

        @inlinable
        public init(username: String, userPoolId: String) {
            self.username = username
            self.userPoolId = userPoolId
        }

        public func validate(name: String) throws {
            try self.validate(self.username, name: "username", parent: name, max: 128)
            try self.validate(self.username, name: "username", parent: name, min: 1)
            try self.validate(self.username, name: "username", parent: name, pattern: "^[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}]+$")
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, max: 55)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, min: 1)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, pattern: "^[\\w-]+_[0-9a-zA-Z]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case username = "Username"
            case userPoolId = "UserPoolId"
        }
    }

    public struct AdminDisableUserResponse: AWSDecodableShape {
        public init() {}
    }

    public struct AdminEnableUserRequest: AWSEncodableShape {
        /// The name of the user that you want to query or modify. The value of this parameter is typically your user's username, but it can be any of their alias attributes. If username isn't an alias attribute in your user pool, this value must be the sub of a local user or the username of a user from a third-party IdP.
        public let username: String
        /// The ID of the user pool where you want to activate sign-in for the user.
        public let userPoolId: String

        @inlinable
        public init(username: String, userPoolId: String) {
            self.username = username
            self.userPoolId = userPoolId
        }

        public func validate(name: String) throws {
            try self.validate(self.username, name: "username", parent: name, max: 128)
            try self.validate(self.username, name: "username", parent: name, min: 1)
            try self.validate(self.username, name: "username", parent: name, pattern: "^[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}]+$")
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, max: 55)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, min: 1)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, pattern: "^[\\w-]+_[0-9a-zA-Z]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case username = "Username"
            case userPoolId = "UserPoolId"
        }
    }

    public struct AdminEnableUserResponse: AWSDecodableShape {
        public init() {}
    }

    public struct AdminForgetDeviceRequest: AWSEncodableShape {
        /// The key ID of the device that you want to delete.
        public let deviceKey: String
        /// The name of the user that you want to query or modify. The value of this parameter is typically your user's username, but it can be any of their alias attributes. If username isn't an alias attribute in your user pool, this value must be the sub of a local user or the username of a user from a third-party IdP.
        public let username: String
        /// The ID of the user pool where the device owner is a user.
        public let userPoolId: String

        @inlinable
        public init(deviceKey: String, username: String, userPoolId: String) {
            self.deviceKey = deviceKey
            self.username = username
            self.userPoolId = userPoolId
        }

        public func validate(name: String) throws {
            try self.validate(self.deviceKey, name: "deviceKey", parent: name, max: 55)
            try self.validate(self.deviceKey, name: "deviceKey", parent: name, min: 1)
            try self.validate(self.deviceKey, name: "deviceKey", parent: name, pattern: "^[\\w-]+_[0-9a-f-]+$")
            try self.validate(self.username, name: "username", parent: name, max: 128)
            try self.validate(self.username, name: "username", parent: name, min: 1)
            try self.validate(self.username, name: "username", parent: name, pattern: "^[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}]+$")
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, max: 55)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, min: 1)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, pattern: "^[\\w-]+_[0-9a-zA-Z]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case deviceKey = "DeviceKey"
            case username = "Username"
            case userPoolId = "UserPoolId"
        }
    }

    public struct AdminGetDeviceRequest: AWSEncodableShape {
        /// The key of the device that you want to delete.
        public let deviceKey: String
        /// The name of the user that you want to query or modify. The value of this parameter is typically your user's username, but it can be any of their alias attributes. If username isn't an alias attribute in your user pool, this value must be the sub of a local user or the username of a user from a third-party IdP.
        public let username: String
        /// The ID of the user pool where the device owner is a user.
        public let userPoolId: String

        @inlinable
        public init(deviceKey: String, username: String, userPoolId: String) {
            self.deviceKey = deviceKey
            self.username = username
            self.userPoolId = userPoolId
        }

        public func validate(name: String) throws {
            try self.validate(self.deviceKey, name: "deviceKey", parent: name, max: 55)
            try self.validate(self.deviceKey, name: "deviceKey", parent: name, min: 1)
            try self.validate(self.deviceKey, name: "deviceKey", parent: name, pattern: "^[\\w-]+_[0-9a-f-]+$")
            try self.validate(self.username, name: "username", parent: name, max: 128)
            try self.validate(self.username, name: "username", parent: name, min: 1)
            try self.validate(self.username, name: "username", parent: name, pattern: "^[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}]+$")
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, max: 55)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, min: 1)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, pattern: "^[\\w-]+_[0-9a-zA-Z]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case deviceKey = "DeviceKey"
            case username = "Username"
            case userPoolId = "UserPoolId"
        }
    }

    public struct AdminGetDeviceResponse: AWSDecodableShape {
        /// Details of the requested device. Includes device information, last-accessed and created dates, and the device key.
        public let device: DeviceType

        @inlinable
        public init(device: DeviceType) {
            self.device = device
        }

        private enum CodingKeys: String, CodingKey {
            case device = "Device"
        }
    }

    public struct AdminGetUserRequest: AWSEncodableShape {
        /// The name of the user that you want to query or modify. The value of this parameter is typically your user's username, but it can be any of their alias attributes. If username isn't an alias attribute in your user pool, this value must be the sub of a local user or the username of a user from a third-party IdP.
        public let username: String
        /// The ID of the user pool where you want to get information about the user.
        public let userPoolId: String

        @inlinable
        public init(username: String, userPoolId: String) {
            self.username = username
            self.userPoolId = userPoolId
        }

        public func validate(name: String) throws {
            try self.validate(self.username, name: "username", parent: name, max: 128)
            try self.validate(self.username, name: "username", parent: name, min: 1)
            try self.validate(self.username, name: "username", parent: name, pattern: "^[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}]+$")
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, max: 55)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, min: 1)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, pattern: "^[\\w-]+_[0-9a-zA-Z]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case username = "Username"
            case userPoolId = "UserPoolId"
        }
    }

    public struct AdminGetUserResponse: AWSDecodableShape {
        /// Indicates whether the user is activated for sign-in.
        public let enabled: Bool?
        ///  This response parameter is no longer supported. It provides information only about SMS MFA configurations. It doesn't provide information about time-based one-time password (TOTP) software token MFA configurations. To look up information about either type of MFA configuration, use UserMFASettingList instead.
        public let mfaOptions: [MFAOptionType]?
        /// The user's preferred MFA. Users can prefer SMS message, email message, or TOTP MFA.
        public let preferredMfaSetting: String?
        /// An array of name-value pairs of user attributes and their values, for example "email": "testuser@example.com".
        public let userAttributes: [AttributeType]?
        /// The date and time when the item was created. Amazon Cognito returns this timestamp in UNIX epoch time format. Your SDK might render the output in a
        /// human-readable format like ISO 8601 or a Java Date object.
        public let userCreateDate: Date?
        /// The date and time when the item was modified. Amazon Cognito returns this timestamp in UNIX epoch time format. Your SDK might render the output in a
        /// human-readable format like ISO 8601 or a Java Date object.
        public let userLastModifiedDate: Date?
        /// The MFA options that are activated for the user. The possible values in this list are SMS_MFA, EMAIL_OTP, and SOFTWARE_TOKEN_MFA.
        public let userMFASettingList: [String]?
        /// The username of the user that you requested.
        public let username: String
        /// The user's status. Can be one of the following:   UNCONFIRMED - User has been created but not confirmed.   CONFIRMED - User has been confirmed.   UNKNOWN - User status isn't known.   RESET_REQUIRED - User is confirmed, but the user must request a code and reset their password before they can sign in.   FORCE_CHANGE_PASSWORD - The user is confirmed and the user can sign in using a temporary password, but on first sign-in, the user must change their password to a new value before doing anything else.    EXTERNAL_PROVIDER - The user signed in with a third-party identity provider.
        public let userStatus: UserStatusType?

        @inlinable
        public init(enabled: Bool? = nil, mfaOptions: [MFAOptionType]? = nil, preferredMfaSetting: String? = nil, userAttributes: [AttributeType]? = nil, userCreateDate: Date? = nil, userLastModifiedDate: Date? = nil, userMFASettingList: [String]? = nil, username: String, userStatus: UserStatusType? = nil) {
            self.enabled = enabled
            self.mfaOptions = mfaOptions
            self.preferredMfaSetting = preferredMfaSetting
            self.userAttributes = userAttributes
            self.userCreateDate = userCreateDate
            self.userLastModifiedDate = userLastModifiedDate
            self.userMFASettingList = userMFASettingList
            self.username = username
            self.userStatus = userStatus
        }

        private enum CodingKeys: String, CodingKey {
            case enabled = "Enabled"
            case mfaOptions = "MFAOptions"
            case preferredMfaSetting = "PreferredMfaSetting"
            case userAttributes = "UserAttributes"
            case userCreateDate = "UserCreateDate"
            case userLastModifiedDate = "UserLastModifiedDate"
            case userMFASettingList = "UserMFASettingList"
            case username = "Username"
            case userStatus = "UserStatus"
        }
    }

    public struct AdminInitiateAuthRequest: AWSEncodableShape {
        /// Information that supports analytics outcomes with Amazon Pinpoint, including the
        /// user's endpoint ID. The endpoint ID is a destination for Amazon Pinpoint push notifications, for example a device identifier,
        /// email address, or phone number.
        public let analyticsMetadata: AnalyticsMetadataType?
        /// The authentication flow that you want to initiate. Each AuthFlow has linked AuthParameters that you must submit. The following are some example flows.  USER_AUTH  The entry point for choice-based authentication with passwords, one-time passwords, and WebAuthn authenticators. Request a preferred authentication type or review available authentication types. From the offered authentication types, select one in a challenge response and then authenticate with that method in an additional challenge response. To activate this setting, your user pool must be in the  Essentials tier or higher.  USER_SRP_AUTH  Username-password authentication with the Secure Remote Password (SRP) protocol. For more information, see Use SRP password verification in custom authentication flow.  REFRESH_TOKEN_AUTH and REFRESH_TOKEN  Receive new ID and access tokens when you pass a REFRESH_TOKEN parameter with a valid refresh token as the value. For more information, see Using the refresh token.  CUSTOM_AUTH  Custom authentication with Lambda triggers. For more information, see Custom authentication challenge Lambda triggers.  ADMIN_USER_PASSWORD_AUTH  Server-side username-password authentication with the password sent directly in the request. For more information about client-side and server-side authentication, see SDK authorization models.
        public let authFlow: AuthFlowType
        /// The authentication parameters. These are inputs corresponding to the AuthFlow that you're invoking. The following are some authentication flows and their parameters. Add a SECRET_HASH parameter if your app client has a client secret. Add DEVICE_KEY if you want to bypass multi-factor authentication with a remembered device.   USER_AUTH     USERNAME (required)    PREFERRED_CHALLENGE. If you don't provide a value for PREFERRED_CHALLENGE, Amazon Cognito responds with the AvailableChallenges parameter that specifies the available sign-in methods.    USER_SRP_AUTH     USERNAME (required)    SRP_A (required)    ADMIN_USER_PASSWORD_AUTH     USERNAME (required)    PASSWORD (required)    REFRESH_TOKEN_AUTH/REFRESH_TOKEN     REFRESH_TOKEN(required)    CUSTOM_AUTH     USERNAME (required)    ChallengeName: SRP_A (when preceding custom authentication with SRP authentication)    SRP_A: (An SRP_A value) (when preceding custom authentication with SRP authentication)     For more information about SECRET_HASH, see Computing secret hash values. For information about DEVICE_KEY, see Working with user devices in your user pool.
        public let authParameters: [String: String]?
        /// The ID of the app client where the user wants to sign in.
        public let clientId: String
        /// A map of custom key-value pairs that you can provide as input for certain custom workflows that this action triggers. You create custom workflows by assigning Lambda functions to user pool triggers. When you use the AdminInitiateAuth API action, Amazon Cognito invokes the Lambda functions that are specified for various triggers. The ClientMetadata value is passed as input to the functions for only the following triggers:   Pre signup   Pre authentication   User migration   When Amazon Cognito invokes the functions for these triggers, it passes a JSON payload, which the function receives as input. This payload contains a validationData attribute, which provides the data that you assigned to the ClientMetadata parameter in your AdminInitiateAuth request. In your function code in Lambda, you can process the validationData value to enhance your workflow for your specific needs. When you use the AdminInitiateAuth API action, Amazon Cognito also invokes the functions for the following triggers, but it doesn't provide the ClientMetadata value as input:   Post authentication   Custom message   Pre token generation   Create auth challenge   Define auth challenge   Custom email sender   Custom SMS sender   For more information, see
        /// Using Lambda triggers in the Amazon Cognito Developer Guide.  When you use the ClientMetadata parameter, note that Amazon Cognito won't do the following:   Store the ClientMetadata value. This data is available only to Lambda triggers that are assigned to a user pool to support custom workflows. If your user pool configuration doesn't include triggers, the ClientMetadata parameter serves no purpose.   Validate the ClientMetadata value.   Encrypt the ClientMetadata value. Don't send sensitive information in this parameter.
        public let clientMetadata: [String: String]?
        /// Contextual data about your user session like the device fingerprint, IP address, or location. Amazon Cognito threat
        /// protection evaluates the risk of an authentication event based on the context that your app generates and passes to Amazon Cognito
        /// when it makes API requests. For more information, see Collecting data for threat protection in
        /// applications.
        public let contextData: ContextDataType?
        /// The optional session ID from a ConfirmSignUp API request. You can sign in a user directly from the sign-up process with an AuthFlow of USER_AUTH and AuthParameters of EMAIL_OTP or SMS_OTP, depending on how your user pool sent the confirmation-code message.
        public let session: String?
        /// The ID of the user pool where the user wants to sign in.
        public let userPoolId: String

        @inlinable
        public init(analyticsMetadata: AnalyticsMetadataType? = nil, authFlow: AuthFlowType, authParameters: [String: String]? = nil, clientId: String, clientMetadata: [String: String]? = nil, contextData: ContextDataType? = nil, session: String? = nil, userPoolId: String) {
            self.analyticsMetadata = analyticsMetadata
            self.authFlow = authFlow
            self.authParameters = authParameters
            self.clientId = clientId
            self.clientMetadata = clientMetadata
            self.contextData = contextData
            self.session = session
            self.userPoolId = userPoolId
        }

        public func validate(name: String) throws {
            try self.analyticsMetadata?.validate(name: "\(name).analyticsMetadata")
            try self.authParameters?.forEach {
                try validate($0.key, name: "authParameters.key", parent: name, max: 131072)
                try validate($0.value, name: "authParameters[\"\($0.key)\"]", parent: name, max: 131072)
            }
            try self.validate(self.clientId, name: "clientId", parent: name, max: 128)
            try self.validate(self.clientId, name: "clientId", parent: name, min: 1)
            try self.validate(self.clientId, name: "clientId", parent: name, pattern: "^[\\w+]+$")
            try self.clientMetadata?.forEach {
                try validate($0.key, name: "clientMetadata.key", parent: name, max: 131072)
                try validate($0.value, name: "clientMetadata[\"\($0.key)\"]", parent: name, max: 131072)
            }
            try self.contextData?.validate(name: "\(name).contextData")
            try self.validate(self.session, name: "session", parent: name, max: 2048)
            try self.validate(self.session, name: "session", parent: name, min: 20)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, max: 55)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, min: 1)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, pattern: "^[\\w-]+_[0-9a-zA-Z]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case analyticsMetadata = "AnalyticsMetadata"
            case authFlow = "AuthFlow"
            case authParameters = "AuthParameters"
            case clientId = "ClientId"
            case clientMetadata = "ClientMetadata"
            case contextData = "ContextData"
            case session = "Session"
            case userPoolId = "UserPoolId"
        }
    }

    public struct AdminInitiateAuthResponse: AWSDecodableShape {
        /// The outcome of successful authentication. This is only returned if the user pool has no additional challenges to return. If Amazon Cognito returns another challenge, the response includes ChallengeName, ChallengeParameters, and Session so that your user can answer the challenge.
        public let authenticationResult: AuthenticationResultType?
        /// This response parameter lists the available authentication challenges that users can select from in choice-based authentication. For example, they might be able to choose between passkey authentication, a one-time password from an SMS message, and a traditional password.
        public let availableChallenges: [ChallengeNameType]?
        /// The name of the challenge that you're responding to with this call. This is returned in the AdminInitiateAuth response if you must pass another challenge. Possible challenges include the following:  All of the following challenges require USERNAME and, when the app client has a client secret, SECRET_HASH in the parameters. Include a  DEVICE_KEY for device authentication.     WEB_AUTHN: Respond to the challenge with the results of a successful authentication with a WebAuthn authenticator, or passkey, as  CREDENTIAL. Examples of WebAuthn authenticators include  biometric devices and security keys.    PASSWORD: Respond with the user's password as PASSWORD.    PASSWORD_SRP: Respond with the initial SRP secret as SRP_A.    SELECT_CHALLENGE: Respond with a challenge selection as ANSWER.  It must be one of the challenge types in the AvailableChallenges response  parameter. Add the parameters of the selected challenge, for example USERNAME and SMS_OTP.    SMS_MFA: Respond with the code that your user pool delivered in an SMS message, as SMS_MFA_CODE     EMAIL_MFA: Respond with the code that your user pool delivered in an email message, as EMAIL_MFA_CODE     EMAIL_OTP: Respond with the code that your user pool delivered in an email message, as EMAIL_OTP_CODE .    SMS_OTP: Respond with the code that your user pool delivered in an SMS message, as SMS_OTP_CODE.    PASSWORD_VERIFIER: Respond with the second stage of SRP secrets as PASSWORD_CLAIM_SIGNATURE, PASSWORD_CLAIM_SECRET_BLOCK,  and TIMESTAMP.    CUSTOM_CHALLENGE: This is returned if your custom authentication flow determines that the user should pass another challenge before tokens are issued. The parameters of the challenge are determined by your Lambda function and issued in the ChallengeParameters of a challenge response.    DEVICE_SRP_AUTH: Respond with the initial parameters of device SRP  authentication. For more information, see Signing in with a device.    DEVICE_PASSWORD_VERIFIER: Respond with PASSWORD_CLAIM_SIGNATURE, PASSWORD_CLAIM_SECRET_BLOCK, and TIMESTAMP after client-side SRP calculations. For more information, see Signing in with a device.    NEW_PASSWORD_REQUIRED: For users who are required to change their passwords after successful first login. Respond to this challenge with  NEW_PASSWORD and any required attributes that Amazon Cognito returned in  the requiredAttributes parameter. You can also set values for  attributes that aren't required by your user pool and that your app client  can write. Amazon Cognito only returns this challenge for users who have temporary passwords. When you create passwordless users, you must provide values for all required  attributes.  In a NEW_PASSWORD_REQUIRED challenge response, you can't modify a required attribute that already has a value.
        /// In AdminRespondToAuthChallenge or RespondToAuthChallenge, set a value for any keys that Amazon Cognito returned in the
        /// requiredAttributes parameter, then use the AdminUpdateUserAttributes or UpdateUserAttributes API
        /// operation to modify the value of any additional attributes.     MFA_SETUP: For users who are required to setup an MFA factor before they can sign in. The MFA types activated for the user pool will be listed in the challenge parameters MFAS_CAN_SETUP value.  To set up time-based one-time password (TOTP) MFA, use the session returned  in this challenge from InitiateAuth or AdminInitiateAuth  as an input to AssociateSoftwareToken. Then, use the session returned by VerifySoftwareToken as an input to  RespondToAuthChallenge or AdminRespondToAuthChallenge with challenge name MFA_SETUP to complete sign-in.  To set up SMS or email MFA, collect a phone_number or  email attribute for the user. Then restart the authentication  flow with an InitiateAuth or AdminInitiateAuth request.
        public let challengeName: ChallengeNameType?
        /// The parameters of an authentication challenge. Amazon Cognito returns challenge parameters as a guide to the responses your user or application must provide for the returned ChallengeName. Calculate responses to the challenge parameters and pass them in the ChallengeParameters of AdminRespondToAuthChallenge. All challenges require USERNAME and, when the app client has a client secret, SECRET_HASH. In SRP challenges, Amazon Cognito returns the username attribute in USER_ID_FOR_SRP instead of any email address, preferred username, or phone number alias that you might have specified in your AdminInitiateAuth request. You must use the username and not an alias in the ChallengeResponses of your challenge response.
        public let challengeParameters: [String: String]?
        /// The session that must be passed to challenge-response requests. If an AdminInitiateAuth or AdminRespondToAuthChallenge API request results in another authentication challenge, Amazon Cognito returns a session ID and the parameters of the next challenge. Pass this session ID in the Session parameter of AdminRespondToAuthChallenge.
        public let session: String?

        @inlinable
        public init(authenticationResult: AuthenticationResultType? = nil, availableChallenges: [ChallengeNameType]? = nil, challengeName: ChallengeNameType? = nil, challengeParameters: [String: String]? = nil, session: String? = nil) {
            self.authenticationResult = authenticationResult
            self.availableChallenges = availableChallenges
            self.challengeName = challengeName
            self.challengeParameters = challengeParameters
            self.session = session
        }

        private enum CodingKeys: String, CodingKey {
            case authenticationResult = "AuthenticationResult"
            case availableChallenges = "AvailableChallenges"
            case challengeName = "ChallengeName"
            case challengeParameters = "ChallengeParameters"
            case session = "Session"
        }
    }

    public struct AdminLinkProviderForUserRequest: AWSEncodableShape {
        /// The existing user in the user pool that you want to assign to the external IdP user account. This user can be a local (Username + Password) Amazon Cognito user pools user or a federated user (for example, a SAML or Facebook user). If the user doesn't exist, Amazon Cognito generates an exception. Amazon Cognito returns this user when the new user (with the linked IdP attribute) signs in. For a native username + password user, the ProviderAttributeValue for the DestinationUser should be the username in the user pool. For a federated user, it should be the provider-specific user_id. The ProviderAttributeName of the DestinationUser is ignored. The ProviderName should be set to Cognito for users in Cognito user pools.  All attributes in the DestinationUser profile must be mutable. If you have assigned the user any immutable custom attributes, the operation won't succeed.
        public let destinationUser: ProviderUserIdentifierType
        /// An external IdP account for a user who doesn't exist yet in the user pool. This user must be a federated user (for example, a SAML or Facebook user), not another native user. If the SourceUser is using a federated social IdP, such as Facebook, Google, or Login with Amazon, you must set the ProviderAttributeName to Cognito_Subject. For social IdPs, the ProviderName will be Facebook, Google, or LoginWithAmazon, and Amazon Cognito will automatically parse the Facebook, Google, and Login with Amazon tokens for id, sub, and user_id, respectively. The ProviderAttributeValue for the user must be the same value as the id, sub, or user_id value found in the social IdP token. For OIDC, the ProviderAttributeName can be any mapped value from a claim in the ID token, or that your app retrieves from the userInfo endpoint. For SAML, the ProviderAttributeName can be any mapped value from a claim in the SAML assertion. The following additional considerations apply to SourceUser for OIDC and SAML providers.   You must map the claim to a user pool attribute in your IdP configuration, and set the user pool attribute name as the value of ProviderAttributeName in your AdminLinkProviderForUser request. For example, email.   When you set ProviderAttributeName to Cognito_Subject, Amazon Cognito will automatically parse the default unique identifier found in the subject from the IdP token.
        public let sourceUser: ProviderUserIdentifierType
        /// The ID of the user pool where you want to link a federated identity.
        public let userPoolId: String

        @inlinable
        public init(destinationUser: ProviderUserIdentifierType, sourceUser: ProviderUserIdentifierType, userPoolId: String) {
            self.destinationUser = destinationUser
            self.sourceUser = sourceUser
            self.userPoolId = userPoolId
        }

        public func validate(name: String) throws {
            try self.destinationUser.validate(name: "\(name).destinationUser")
            try self.sourceUser.validate(name: "\(name).sourceUser")
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, max: 131072)
        }

        private enum CodingKeys: String, CodingKey {
            case destinationUser = "DestinationUser"
            case sourceUser = "SourceUser"
            case userPoolId = "UserPoolId"
        }
    }

    public struct AdminLinkProviderForUserResponse: AWSDecodableShape {
        public init() {}
    }

    public struct AdminListDevicesRequest: AWSEncodableShape {
        /// The maximum number of devices that you want Amazon Cognito to return in the response.
        public let limit: Int?
        /// This API operation returns a limited number of results. The pagination token is
        /// an identifier that you can present in an additional API request with the same parameters. When
        /// you include the pagination token, Amazon Cognito returns the next set of items after the current list.
        /// Subsequent requests return a new pagination token. By use of this token, you can paginate
        /// through the full list of items.
        public let paginationToken: String?
        /// The name of the user that you want to query or modify. The value of this parameter is typically your user's username, but it can be any of their alias attributes. If username isn't an alias attribute in your user pool, this value must be the sub of a local user or the username of a user from a third-party IdP.
        public let username: String
        /// The ID of the user pool where the device owner is a user.
        public let userPoolId: String

        @inlinable
        public init(limit: Int? = nil, paginationToken: String? = nil, username: String, userPoolId: String) {
            self.limit = limit
            self.paginationToken = paginationToken
            self.username = username
            self.userPoolId = userPoolId
        }

        public func validate(name: String) throws {
            try self.validate(self.limit, name: "limit", parent: name, max: 60)
            try self.validate(self.limit, name: "limit", parent: name, min: 0)
            try self.validate(self.paginationToken, name: "paginationToken", parent: name, min: 1)
            try self.validate(self.paginationToken, name: "paginationToken", parent: name, pattern: "^[\\S]+$")
            try self.validate(self.username, name: "username", parent: name, max: 128)
            try self.validate(self.username, name: "username", parent: name, min: 1)
            try self.validate(self.username, name: "username", parent: name, pattern: "^[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}]+$")
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, max: 55)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, min: 1)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, pattern: "^[\\w-]+_[0-9a-zA-Z]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case limit = "Limit"
            case paginationToken = "PaginationToken"
            case username = "Username"
            case userPoolId = "UserPoolId"
        }
    }

    public struct AdminListDevicesResponse: AWSDecodableShape {
        /// An array of devices and their information. Each entry that's returned includes device information, last-accessed and created dates, and the device key.
        public let devices: [DeviceType]?
        /// The identifier that Amazon Cognito returned with the previous request to this operation. When
        /// you include a pagination token in your request, Amazon Cognito returns the next set of items in
        /// the list. By use of this token, you can paginate through the full list of items.
        public let paginationToken: String?

        @inlinable
        public init(devices: [DeviceType]? = nil, paginationToken: String? = nil) {
            self.devices = devices
            self.paginationToken = paginationToken
        }

        private enum CodingKeys: String, CodingKey {
            case devices = "Devices"
            case paginationToken = "PaginationToken"
        }
    }

    public struct AdminListGroupsForUserRequest: AWSEncodableShape {
        /// The maximum number of groups that you want Amazon Cognito to return in the response.
        public let limit: Int?
        /// This API operation returns a limited number of results. The pagination token is
        /// an identifier that you can present in an additional API request with the same parameters. When
        /// you include the pagination token, Amazon Cognito returns the next set of items after the current list.
        /// Subsequent requests return a new pagination token. By use of this token, you can paginate
        /// through the full list of items.
        public let nextToken: String?
        /// The name of the user that you want to query or modify. The value of this parameter is typically your user's username, but it can be any of their alias attributes. If username isn't an alias attribute in your user pool, this value must be the sub of a local user or the username of a user from a third-party IdP.
        public let username: String
        /// The ID of the user pool where you want to view a user's groups.
        public let userPoolId: String

        @inlinable
        public init(limit: Int? = nil, nextToken: String? = nil, username: String, userPoolId: String) {
            self.limit = limit
            self.nextToken = nextToken
            self.username = username
            self.userPoolId = userPoolId
        }

        public func validate(name: String) throws {
            try self.validate(self.limit, name: "limit", parent: name, max: 60)
            try self.validate(self.limit, name: "limit", parent: name, min: 0)
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 131072)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, pattern: "^[\\S]+$")
            try self.validate(self.username, name: "username", parent: name, max: 128)
            try self.validate(self.username, name: "username", parent: name, min: 1)
            try self.validate(self.username, name: "username", parent: name, pattern: "^[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}]+$")
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, max: 55)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, min: 1)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, pattern: "^[\\w-]+_[0-9a-zA-Z]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case limit = "Limit"
            case nextToken = "NextToken"
            case username = "Username"
            case userPoolId = "UserPoolId"
        }
    }

    public struct AdminListGroupsForUserResponse: AWSDecodableShape {
        /// An array of groups and information about them.
        public let groups: [GroupType]?
        /// The identifier that Amazon Cognito returned with the previous request to this operation. When
        /// you include a pagination token in your request, Amazon Cognito returns the next set of items in
        /// the list. By use of this token, you can paginate through the full list of items.
        public let nextToken: String?

        @inlinable
        public init(groups: [GroupType]? = nil, nextToken: String? = nil) {
            self.groups = groups
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case groups = "Groups"
            case nextToken = "NextToken"
        }
    }

    public struct AdminListUserAuthEventsRequest: AWSEncodableShape {
        /// The maximum number of authentication events to return. Returns 60 events if you set MaxResults to 0, or if you don't include a MaxResults parameter.
        public let maxResults: Int?
        /// This API operation returns a limited number of results. The pagination token is
        /// an identifier that you can present in an additional API request with the same parameters. When
        /// you include the pagination token, Amazon Cognito returns the next set of items after the current list.
        /// Subsequent requests return a new pagination token. By use of this token, you can paginate
        /// through the full list of items.
        public let nextToken: String?
        /// The name of the user that you want to query or modify. The value of this parameter is typically your user's username, but it can be any of their alias attributes. If username isn't an alias attribute in your user pool, this value must be the sub of a local user or the username of a user from a third-party IdP.
        public let username: String
        /// The Id of the user pool that contains the user profile with the logged events.
        public let userPoolId: String

        @inlinable
        public init(maxResults: Int? = nil, nextToken: String? = nil, username: String, userPoolId: String) {
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.username = username
            self.userPoolId = userPoolId
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 60)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 0)
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 131072)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, pattern: "^[\\S]+$")
            try self.validate(self.username, name: "username", parent: name, max: 128)
            try self.validate(self.username, name: "username", parent: name, min: 1)
            try self.validate(self.username, name: "username", parent: name, pattern: "^[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}]+$")
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, max: 55)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, min: 1)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, pattern: "^[\\w-]+_[0-9a-zA-Z]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
            case username = "Username"
            case userPoolId = "UserPoolId"
        }
    }

    public struct AdminListUserAuthEventsResponse: AWSDecodableShape {
        /// The response object. It includes the EventID, EventType, CreationDate, EventRisk, and EventResponse.
        public let authEvents: [AuthEventType]?
        /// The identifier that Amazon Cognito returned with the previous request to this operation. When
        /// you include a pagination token in your request, Amazon Cognito returns the next set of items in
        /// the list. By use of this token, you can paginate through the full list of items.
        public let nextToken: String?

        @inlinable
        public init(authEvents: [AuthEventType]? = nil, nextToken: String? = nil) {
            self.authEvents = authEvents
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case authEvents = "AuthEvents"
            case nextToken = "NextToken"
        }
    }

    public struct AdminRemoveUserFromGroupRequest: AWSEncodableShape {
        /// The name of the group that you want to remove the user from, for example MyTestGroup.
        public let groupName: String
        /// The name of the user that you want to query or modify. The value of this parameter is typically your user's username, but it can be any of their alias attributes. If username isn't an alias attribute in your user pool, this value must be the sub of a local user or the username of a user from a third-party IdP.
        public let username: String
        /// The ID of the user pool that contains the group and the user that you want to remove.
        public let userPoolId: String

        @inlinable
        public init(groupName: String, username: String, userPoolId: String) {
            self.groupName = groupName
            self.username = username
            self.userPoolId = userPoolId
        }

        public func validate(name: String) throws {
            try self.validate(self.groupName, name: "groupName", parent: name, max: 128)
            try self.validate(self.groupName, name: "groupName", parent: name, min: 1)
            try self.validate(self.groupName, name: "groupName", parent: name, pattern: "^[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}]+$")
            try self.validate(self.username, name: "username", parent: name, max: 128)
            try self.validate(self.username, name: "username", parent: name, min: 1)
            try self.validate(self.username, name: "username", parent: name, pattern: "^[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}]+$")
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, max: 55)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, min: 1)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, pattern: "^[\\w-]+_[0-9a-zA-Z]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case groupName = "GroupName"
            case username = "Username"
            case userPoolId = "UserPoolId"
        }
    }

    public struct AdminResetUserPasswordRequest: AWSEncodableShape {
        /// A map of custom key-value pairs that you can provide as input for any custom workflows that this action triggers. You create custom workflows by assigning Lambda functions to user pool triggers. The AdminResetUserPassword API operation invokes the function that is assigned to the custom message trigger. When Amazon Cognito invokes this function, it passes a JSON payload, which the function receives as input. This payload contains a clientMetadata attribute, which provides the data that you assigned to the ClientMetadata parameter in your AdminResetUserPassword request. In your function code in Lambda, you can process the clientMetadata value to enhance your workflow for your specific needs.  For more information, see
        /// Using Lambda triggers in the Amazon Cognito Developer Guide.  When you use the ClientMetadata parameter, note that Amazon Cognito won't do the following:   Store the ClientMetadata value. This data is available only to Lambda triggers that are assigned to a user pool to support custom workflows. If your user pool configuration doesn't include triggers, the ClientMetadata parameter serves no purpose.   Validate the ClientMetadata value.   Encrypt the ClientMetadata value. Don't send sensitive information in this parameter.
        public let clientMetadata: [String: String]?
        /// The name of the user that you want to query or modify. The value of this parameter is typically your user's username, but it can be any of their alias attributes. If username isn't an alias attribute in your user pool, this value must be the sub of a local user or the username of a user from a third-party IdP.
        public let username: String
        /// The ID of the user pool where you want to reset the user's password.
        public let userPoolId: String

        @inlinable
        public init(clientMetadata: [String: String]? = nil, username: String, userPoolId: String) {
            self.clientMetadata = clientMetadata
            self.username = username
            self.userPoolId = userPoolId
        }

        public func validate(name: String) throws {
            try self.clientMetadata?.forEach {
                try validate($0.key, name: "clientMetadata.key", parent: name, max: 131072)
                try validate($0.value, name: "clientMetadata[\"\($0.key)\"]", parent: name, max: 131072)
            }
            try self.validate(self.username, name: "username", parent: name, max: 128)
            try self.validate(self.username, name: "username", parent: name, min: 1)
            try self.validate(self.username, name: "username", parent: name, pattern: "^[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}]+$")
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, max: 55)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, min: 1)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, pattern: "^[\\w-]+_[0-9a-zA-Z]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case clientMetadata = "ClientMetadata"
            case username = "Username"
            case userPoolId = "UserPoolId"
        }
    }

    public struct AdminResetUserPasswordResponse: AWSDecodableShape {
        public init() {}
    }

    public struct AdminRespondToAuthChallengeRequest: AWSEncodableShape {
        /// Information that supports analytics outcomes with Amazon Pinpoint, including the
        /// user's endpoint ID. The endpoint ID is a destination for Amazon Pinpoint push notifications, for example a device identifier,
        /// email address, or phone number.
        public let analyticsMetadata: AnalyticsMetadataType?
        /// The name of the challenge that you are responding to. Possible challenges include the following:  All of the following challenges require USERNAME and, when the app client has a client secret, SECRET_HASH in the parameters. Include a  DEVICE_KEY for device authentication.     WEB_AUTHN: Respond to the challenge with the results of a successful authentication with a WebAuthn authenticator, or passkey, as  CREDENTIAL. Examples of WebAuthn authenticators include  biometric devices and security keys.    PASSWORD: Respond with the user's password as PASSWORD.    PASSWORD_SRP: Respond with the initial SRP secret as SRP_A.    SELECT_CHALLENGE: Respond with a challenge selection as ANSWER.  It must be one of the challenge types in the AvailableChallenges response  parameter. Add the parameters of the selected challenge, for example USERNAME and SMS_OTP.    SMS_MFA: Respond with the code that your user pool delivered in an SMS message, as SMS_MFA_CODE     EMAIL_MFA: Respond with the code that your user pool delivered in an email message, as EMAIL_MFA_CODE     EMAIL_OTP: Respond with the code that your user pool delivered in an email message, as EMAIL_OTP_CODE .    SMS_OTP: Respond with the code that your user pool delivered in an SMS message, as SMS_OTP_CODE.    PASSWORD_VERIFIER: Respond with the second stage of SRP secrets as PASSWORD_CLAIM_SIGNATURE, PASSWORD_CLAIM_SECRET_BLOCK,  and TIMESTAMP.    CUSTOM_CHALLENGE: This is returned if your custom authentication flow determines that the user should pass another challenge before tokens are issued. The parameters of the challenge are determined by your Lambda function and issued in the ChallengeParameters of a challenge response.    DEVICE_SRP_AUTH: Respond with the initial parameters of device SRP  authentication. For more information, see Signing in with a device.    DEVICE_PASSWORD_VERIFIER: Respond with PASSWORD_CLAIM_SIGNATURE, PASSWORD_CLAIM_SECRET_BLOCK, and TIMESTAMP after client-side SRP calculations. For more information, see Signing in with a device.    NEW_PASSWORD_REQUIRED: For users who are required to change their passwords after successful first login. Respond to this challenge with  NEW_PASSWORD and any required attributes that Amazon Cognito returned in  the requiredAttributes parameter. You can also set values for  attributes that aren't required by your user pool and that your app client  can write. Amazon Cognito only returns this challenge for users who have temporary passwords. When you create passwordless users, you must provide values for all required  attributes.  In a NEW_PASSWORD_REQUIRED challenge response, you can't modify a required attribute that already has a value.
        /// In AdminRespondToAuthChallenge or RespondToAuthChallenge, set a value for any keys that Amazon Cognito returned in the
        /// requiredAttributes parameter, then use the AdminUpdateUserAttributes or UpdateUserAttributes API
        /// operation to modify the value of any additional attributes.     MFA_SETUP: For users who are required to setup an MFA factor before they can sign in. The MFA types activated for the user pool will be listed in the challenge parameters MFAS_CAN_SETUP value.  To set up time-based one-time password (TOTP) MFA, use the session returned  in this challenge from InitiateAuth or AdminInitiateAuth  as an input to AssociateSoftwareToken. Then, use the session returned by VerifySoftwareToken as an input to  RespondToAuthChallenge or AdminRespondToAuthChallenge with challenge name MFA_SETUP to complete sign-in.  To set up SMS or email MFA, collect a phone_number or  email attribute for the user. Then restart the authentication  flow with an InitiateAuth or AdminInitiateAuth request.
        public let challengeName: ChallengeNameType
        /// The responses to the challenge that you received in the previous request. Each challenge has its own required response parameters. The following examples are partial JSON request bodies that highlight challenge-response parameters.  You must provide a SECRET_HASH parameter in all challenge responses to an app client that has a client secret. Include a DEVICE_KEY for device authentication.   SELECT_CHALLENGE   "ChallengeName": "SELECT_CHALLENGE", "ChallengeResponses": { "USERNAME": "[username]", "ANSWER": "[Challenge name]"}  Available challenges are PASSWORD, PASSWORD_SRP,  EMAIL_OTP, SMS_OTP, and WEB_AUTHN. Complete authentication in the SELECT_CHALLENGE response for PASSWORD, PASSWORD_SRP, and WEB_AUTHN:    "ChallengeName": "SELECT_CHALLENGE", "ChallengeResponses": { "ANSWER": "WEB_AUTHN", "USERNAME": "[username]", "CREDENTIAL": "[AuthenticationResponseJSON]"}  See  AuthenticationResponseJSON.    "ChallengeName": "SELECT_CHALLENGE", "ChallengeResponses": { "ANSWER": "PASSWORD", "USERNAME": "[username]", "PASSWORD": "[password]"}     "ChallengeName": "SELECT_CHALLENGE", "ChallengeResponses": { "ANSWER": "PASSWORD_SRP", "USERNAME": "[username]", "SRP_A": "[SRP_A]"}    For SMS_OTP and EMAIL_OTP, respond with the username and answer. Your user pool will send a code for the user to submit in the next challenge response.    "ChallengeName": "SELECT_CHALLENGE", "ChallengeResponses": { "ANSWER": "SMS_OTP", "USERNAME": "[username]"}     "ChallengeName": "SELECT_CHALLENGE", "ChallengeResponses": { "ANSWER": "EMAIL_OTP", "USERNAME": "[username]"}     WEB_AUTHN   "ChallengeName": "WEB_AUTHN", "ChallengeResponses": { "USERNAME": "[username]", "CREDENTIAL": "[AuthenticationResponseJSON]"}  See  AuthenticationResponseJSON.  PASSWORD   "ChallengeName": "PASSWORD", "ChallengeResponses": { "USERNAME": "[username]", "PASSWORD": "[password]"}   PASSWORD_SRP   "ChallengeName": "PASSWORD_SRP", "ChallengeResponses": { "USERNAME": "[username]", "SRP_A": "[SRP_A]"}   SMS_OTP   "ChallengeName": "SMS_OTP", "ChallengeResponses":  {"SMS_OTP_CODE": "[code]", "USERNAME": "[username]"}   EMAIL_OTP   "ChallengeName": "EMAIL_OTP", "ChallengeResponses": {"EMAIL_OTP_CODE": "[code]", "USERNAME": "[username]"}   SMS_MFA   "ChallengeName": "SMS_MFA", "ChallengeResponses": {"SMS_MFA_CODE": "[code]", "USERNAME": "[username]"}   PASSWORD_VERIFIER  This challenge response is part of the SRP flow. Amazon Cognito requires  that your application respond to this challenge within a few seconds. When the response time exceeds this period, your user pool returns a NotAuthorizedException error.  "ChallengeName": "PASSWORD_VERIFIER", "ChallengeResponses": {"PASSWORD_CLAIM_SIGNATURE": "[claim_signature]", "PASSWORD_CLAIM_SECRET_BLOCK": "[secret_block]", "TIMESTAMP": [timestamp], "USERNAME": "[username]"}   CUSTOM_CHALLENGE   "ChallengeName": "CUSTOM_CHALLENGE", "ChallengeResponses": {"USERNAME": "[username]", "ANSWER": "[challenge_answer]"}   NEW_PASSWORD_REQUIRED   "ChallengeName": "NEW_PASSWORD_REQUIRED", "ChallengeResponses": {"NEW_PASSWORD": "[new_password]", "USERNAME": "[username]"}  To set any required attributes that InitiateAuth returned in an requiredAttributes parameter, add "userAttributes.[attribute_name]": "[attribute_value]". This parameter can also set values for writable attributes that aren't required by your user pool.  In a NEW_PASSWORD_REQUIRED challenge response, you can't modify a required attribute that already has a value.
        /// In AdminRespondToAuthChallenge or RespondToAuthChallenge, set a value for any keys that Amazon Cognito returned in the
        /// requiredAttributes parameter, then use the AdminUpdateUserAttributes or UpdateUserAttributes API
        /// operation to modify the value of any additional attributes.   SOFTWARE_TOKEN_MFA   "ChallengeName": "SOFTWARE_TOKEN_MFA", "ChallengeResponses": {"USERNAME": "[username]", "SOFTWARE_TOKEN_MFA_CODE": [authenticator_code]}   DEVICE_SRP_AUTH   "ChallengeName": "DEVICE_SRP_AUTH", "ChallengeResponses": {"USERNAME": "[username]", "DEVICE_KEY": "[device_key]", "SRP_A": "[srp_a]"}   DEVICE_PASSWORD_VERIFIER   "ChallengeName": "DEVICE_PASSWORD_VERIFIER", "ChallengeResponses": {"DEVICE_KEY": "[device_key]", "PASSWORD_CLAIM_SIGNATURE": "[claim_signature]", "PASSWORD_CLAIM_SECRET_BLOCK": "[secret_block]", "TIMESTAMP": [timestamp], "USERNAME": "[username]"}   MFA_SETUP   "ChallengeName": "MFA_SETUP", "ChallengeResponses": {"USERNAME": "[username]"}, "SESSION": "[Session ID from VerifySoftwareToken]"   SELECT_MFA_TYPE   "ChallengeName": "SELECT_MFA_TYPE", "ChallengeResponses": {"USERNAME": "[username]", "ANSWER": "[SMS_MFA|EMAIL_MFA|SOFTWARE_TOKEN_MFA]"}    For more information about SECRET_HASH, see Computing secret hash values. For information about DEVICE_KEY, see Working with user devices in your user pool.
        public let challengeResponses: [String: String]?
        /// The ID of the app client where you initiated sign-in.
        public let clientId: String
        /// A map of custom key-value pairs that you can provide as input for any custom workflows that this action triggers. You create custom workflows by assigning Lambda functions to user pool triggers. When you use the AdminRespondToAuthChallenge API action, Amazon Cognito invokes any functions that you have assigned to the following triggers:    Pre sign-up   custom message   Post authentication   User migration   Pre token generation   Define auth challenge   Create auth challenge   Verify auth challenge response   When Amazon Cognito invokes any of these functions, it passes a JSON payload, which the function receives as input. This payload contains a clientMetadata attribute that provides the data that you assigned to the ClientMetadata parameter in your AdminRespondToAuthChallenge request. In your function code in Lambda, you can process the clientMetadata value to enhance your workflow for your specific needs. For more information, see
        /// Using Lambda triggers in the Amazon Cognito Developer Guide.  When you use the ClientMetadata parameter, note that Amazon Cognito won't do the following:   Store the ClientMetadata value. This data is available only to Lambda triggers that are assigned to a user pool to support custom workflows. If your user pool configuration doesn't include triggers, the ClientMetadata parameter serves no purpose.   Validate the ClientMetadata value.   Encrypt the ClientMetadata value. Don't send sensitive information in this parameter.
        public let clientMetadata: [String: String]?
        /// Contextual data about your user session like the device fingerprint, IP address, or location. Amazon Cognito threat
        /// protection evaluates the risk of an authentication event based on the context that your app generates and passes to Amazon Cognito
        /// when it makes API requests. For more information, see Collecting data for threat protection in
        /// applications.
        public let contextData: ContextDataType?
        /// The session identifier that maintains the state of authentication requests and challenge responses. If an AdminInitiateAuth or AdminRespondToAuthChallenge API request results in a determination that your application must pass another challenge, Amazon Cognito returns a session with other challenge parameters. Send this session identifier, unmodified, to the next AdminRespondToAuthChallenge request.
        public let session: String?
        /// The ID of the user pool where you want to respond to an authentication challenge.
        public let userPoolId: String

        @inlinable
        public init(analyticsMetadata: AnalyticsMetadataType? = nil, challengeName: ChallengeNameType, challengeResponses: [String: String]? = nil, clientId: String, clientMetadata: [String: String]? = nil, contextData: ContextDataType? = nil, session: String? = nil, userPoolId: String) {
            self.analyticsMetadata = analyticsMetadata
            self.challengeName = challengeName
            self.challengeResponses = challengeResponses
            self.clientId = clientId
            self.clientMetadata = clientMetadata
            self.contextData = contextData
            self.session = session
            self.userPoolId = userPoolId
        }

        public func validate(name: String) throws {
            try self.analyticsMetadata?.validate(name: "\(name).analyticsMetadata")
            try self.challengeResponses?.forEach {
                try validate($0.key, name: "challengeResponses.key", parent: name, max: 131072)
                try validate($0.value, name: "challengeResponses[\"\($0.key)\"]", parent: name, max: 131072)
            }
            try self.validate(self.clientId, name: "clientId", parent: name, max: 128)
            try self.validate(self.clientId, name: "clientId", parent: name, min: 1)
            try self.validate(self.clientId, name: "clientId", parent: name, pattern: "^[\\w+]+$")
            try self.clientMetadata?.forEach {
                try validate($0.key, name: "clientMetadata.key", parent: name, max: 131072)
                try validate($0.value, name: "clientMetadata[\"\($0.key)\"]", parent: name, max: 131072)
            }
            try self.contextData?.validate(name: "\(name).contextData")
            try self.validate(self.session, name: "session", parent: name, max: 2048)
            try self.validate(self.session, name: "session", parent: name, min: 20)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, max: 55)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, min: 1)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, pattern: "^[\\w-]+_[0-9a-zA-Z]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case analyticsMetadata = "AnalyticsMetadata"
            case challengeName = "ChallengeName"
            case challengeResponses = "ChallengeResponses"
            case clientId = "ClientId"
            case clientMetadata = "ClientMetadata"
            case contextData = "ContextData"
            case session = "Session"
            case userPoolId = "UserPoolId"
        }
    }

    public struct AdminRespondToAuthChallengeResponse: AWSDecodableShape {
        /// The outcome of a successful authentication process. After your application has passed all challenges, Amazon Cognito returns an AuthenticationResult with the JSON web tokens (JWTs) that indicate successful sign-in.
        public let authenticationResult: AuthenticationResultType?
        /// The name of the next challenge that you must respond to. Possible challenges include the following:  All of the following challenges require USERNAME and, when the app client has a client secret, SECRET_HASH in the parameters. Include a  DEVICE_KEY for device authentication.     WEB_AUTHN: Respond to the challenge with the results of a successful authentication with a WebAuthn authenticator, or passkey, as  CREDENTIAL. Examples of WebAuthn authenticators include  biometric devices and security keys.    PASSWORD: Respond with the user's password as PASSWORD.    PASSWORD_SRP: Respond with the initial SRP secret as SRP_A.    SELECT_CHALLENGE: Respond with a challenge selection as ANSWER.  It must be one of the challenge types in the AvailableChallenges response  parameter. Add the parameters of the selected challenge, for example USERNAME and SMS_OTP.    SMS_MFA: Respond with the code that your user pool delivered in an SMS message, as SMS_MFA_CODE     EMAIL_MFA: Respond with the code that your user pool delivered in an email message, as EMAIL_MFA_CODE     EMAIL_OTP: Respond with the code that your user pool delivered in an email message, as EMAIL_OTP_CODE .    SMS_OTP: Respond with the code that your user pool delivered in an SMS message, as SMS_OTP_CODE.    PASSWORD_VERIFIER: Respond with the second stage of SRP secrets as PASSWORD_CLAIM_SIGNATURE, PASSWORD_CLAIM_SECRET_BLOCK,  and TIMESTAMP.    CUSTOM_CHALLENGE: This is returned if your custom authentication flow determines that the user should pass another challenge before tokens are issued. The parameters of the challenge are determined by your Lambda function and issued in the ChallengeParameters of a challenge response.    DEVICE_SRP_AUTH: Respond with the initial parameters of device SRP  authentication. For more information, see Signing in with a device.    DEVICE_PASSWORD_VERIFIER: Respond with PASSWORD_CLAIM_SIGNATURE, PASSWORD_CLAIM_SECRET_BLOCK, and TIMESTAMP after client-side SRP calculations. For more information, see Signing in with a device.    NEW_PASSWORD_REQUIRED: For users who are required to change their passwords after successful first login. Respond to this challenge with  NEW_PASSWORD and any required attributes that Amazon Cognito returned in  the requiredAttributes parameter. You can also set values for  attributes that aren't required by your user pool and that your app client  can write. Amazon Cognito only returns this challenge for users who have temporary passwords. When you create passwordless users, you must provide values for all required  attributes.  In a NEW_PASSWORD_REQUIRED challenge response, you can't modify a required attribute that already has a value.
        /// In AdminRespondToAuthChallenge or RespondToAuthChallenge, set a value for any keys that Amazon Cognito returned in the
        /// requiredAttributes parameter, then use the AdminUpdateUserAttributes or UpdateUserAttributes API
        /// operation to modify the value of any additional attributes.     MFA_SETUP: For users who are required to setup an MFA factor before they can sign in. The MFA types activated for the user pool will be listed in the challenge parameters MFAS_CAN_SETUP value.  To set up time-based one-time password (TOTP) MFA, use the session returned  in this challenge from InitiateAuth or AdminInitiateAuth  as an input to AssociateSoftwareToken. Then, use the session returned by VerifySoftwareToken as an input to  RespondToAuthChallenge or AdminRespondToAuthChallenge with challenge name MFA_SETUP to complete sign-in.  To set up SMS or email MFA, collect a phone_number or  email attribute for the user. Then restart the authentication  flow with an InitiateAuth or AdminInitiateAuth request.
        public let challengeName: ChallengeNameType?
        /// The parameters that define your response to the next challenge.
        public let challengeParameters: [String: String]?
        /// The session identifier that maintains the state of authentication requests and challenge responses. If an AdminInitiateAuth or AdminRespondToAuthChallenge API request results in a determination that your application must pass another challenge, Amazon Cognito returns a session with other challenge parameters. Send this session identifier, unmodified, to the next AdminRespondToAuthChallenge request.
        public let session: String?

        @inlinable
        public init(authenticationResult: AuthenticationResultType? = nil, challengeName: ChallengeNameType? = nil, challengeParameters: [String: String]? = nil, session: String? = nil) {
            self.authenticationResult = authenticationResult
            self.challengeName = challengeName
            self.challengeParameters = challengeParameters
            self.session = session
        }

        private enum CodingKeys: String, CodingKey {
            case authenticationResult = "AuthenticationResult"
            case challengeName = "ChallengeName"
            case challengeParameters = "ChallengeParameters"
            case session = "Session"
        }
    }

    public struct AdminSetUserMFAPreferenceRequest: AWSEncodableShape {
        /// User preferences for email message MFA. Activates or deactivates email MFA and sets it as the preferred MFA method when multiple methods are available. To activate this setting, your user pool must be in the  Essentials tier or higher.
        public let emailMfaSettings: EmailMfaSettingsType?
        /// User preferences for SMS message MFA. Activates or deactivates SMS MFA and sets it as the preferred MFA method when multiple methods are available.
        public let smsMfaSettings: SMSMfaSettingsType?
        /// User preferences for time-based one-time password (TOTP) MFA. Activates or deactivates TOTP MFA and sets it as the preferred MFA method when multiple methods are available. This operation can set TOTP as a user's preferred MFA method before they register a TOTP authenticator.
        public let softwareTokenMfaSettings: SoftwareTokenMfaSettingsType?
        /// The name of the user that you want to query or modify. The value of this parameter is typically your user's username, but it can be any of their alias attributes. If username isn't an alias attribute in your user pool, this value must be the sub of a local user or the username of a user from a third-party IdP.
        public let username: String
        /// The ID of the user pool where you want to set a user's MFA preferences.
        public let userPoolId: String

        @inlinable
        public init(emailMfaSettings: EmailMfaSettingsType? = nil, smsMfaSettings: SMSMfaSettingsType? = nil, softwareTokenMfaSettings: SoftwareTokenMfaSettingsType? = nil, username: String, userPoolId: String) {
            self.emailMfaSettings = emailMfaSettings
            self.smsMfaSettings = smsMfaSettings
            self.softwareTokenMfaSettings = softwareTokenMfaSettings
            self.username = username
            self.userPoolId = userPoolId
        }

        public func validate(name: String) throws {
            try self.validate(self.username, name: "username", parent: name, max: 128)
            try self.validate(self.username, name: "username", parent: name, min: 1)
            try self.validate(self.username, name: "username", parent: name, pattern: "^[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}]+$")
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, max: 55)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, min: 1)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, pattern: "^[\\w-]+_[0-9a-zA-Z]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case emailMfaSettings = "EmailMfaSettings"
            case smsMfaSettings = "SMSMfaSettings"
            case softwareTokenMfaSettings = "SoftwareTokenMfaSettings"
            case username = "Username"
            case userPoolId = "UserPoolId"
        }
    }

    public struct AdminSetUserMFAPreferenceResponse: AWSDecodableShape {
        public init() {}
    }

    public struct AdminSetUserPasswordRequest: AWSEncodableShape {
        /// The new temporary or permanent password that you want to set for the user. You can't remove the password for a user who already has a password so that they can only sign in with passwordless methods. In this scenario, you must create a new user without a password.
        public let password: String
        /// Set to true to set a password that the user can immediately sign in with. Set to false to set a temporary password that the user must change on their next sign-in.
        public let permanent: Bool?
        /// The name of the user that you want to query or modify. The value of this parameter is typically your user's username, but it can be any of their alias attributes. If username isn't an alias attribute in your user pool, this value must be the sub of a local user or the username of a user from a third-party IdP.
        public let username: String
        /// The ID of the user pool where you want to set the user's password.
        public let userPoolId: String

        @inlinable
        public init(password: String, permanent: Bool? = nil, username: String, userPoolId: String) {
            self.password = password
            self.permanent = permanent
            self.username = username
            self.userPoolId = userPoolId
        }

        public func validate(name: String) throws {
            try self.validate(self.password, name: "password", parent: name, max: 256)
            try self.validate(self.password, name: "password", parent: name, pattern: "^[\\S]+$")
            try self.validate(self.username, name: "username", parent: name, max: 128)
            try self.validate(self.username, name: "username", parent: name, min: 1)
            try self.validate(self.username, name: "username", parent: name, pattern: "^[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}]+$")
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, max: 55)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, min: 1)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, pattern: "^[\\w-]+_[0-9a-zA-Z]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case password = "Password"
            case permanent = "Permanent"
            case username = "Username"
            case userPoolId = "UserPoolId"
        }
    }

    public struct AdminSetUserPasswordResponse: AWSDecodableShape {
        public init() {}
    }

    public struct AdminSetUserSettingsRequest: AWSEncodableShape {
        /// You can use this parameter only to set an SMS configuration that uses SMS for delivery.
        public let mfaOptions: [MFAOptionType]
        /// The name of the user that you want to query or modify. The value of this parameter is typically your user's username, but it can be any of their alias attributes. If username isn't an alias attribute in your user pool, this value must be the sub of a local user or the username of a user from a third-party IdP.
        public let username: String
        /// The ID of the user pool that contains the user whose options you're setting.
        public let userPoolId: String

        @inlinable
        public init(mfaOptions: [MFAOptionType], username: String, userPoolId: String) {
            self.mfaOptions = mfaOptions
            self.username = username
            self.userPoolId = userPoolId
        }

        public func validate(name: String) throws {
            try self.mfaOptions.forEach {
                try $0.validate(name: "\(name).mfaOptions[]")
            }
            try self.validate(self.username, name: "username", parent: name, max: 128)
            try self.validate(self.username, name: "username", parent: name, min: 1)
            try self.validate(self.username, name: "username", parent: name, pattern: "^[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}]+$")
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, max: 55)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, min: 1)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, pattern: "^[\\w-]+_[0-9a-zA-Z]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case mfaOptions = "MFAOptions"
            case username = "Username"
            case userPoolId = "UserPoolId"
        }
    }

    public struct AdminSetUserSettingsResponse: AWSDecodableShape {
        public init() {}
    }

    public struct AdminUpdateAuthEventFeedbackRequest: AWSEncodableShape {
        /// The ID of the threat protection authentication event that you want to update.
        public let eventId: String
        /// Your feedback to the authentication event. When you provide a FeedbackValue
        /// value of valid, you tell Amazon Cognito that you trust a user session where Amazon Cognito
        /// has evaluated some level of risk. When you provide a FeedbackValue value of
        /// invalid, you tell Amazon Cognito that you don't trust a user session, or you
        /// don't believe that Amazon Cognito evaluated a high-enough risk level.
        public let feedbackValue: FeedbackValueType
        /// The name of the user that you want to query or modify. The value of this parameter is typically your user's username, but it can be any of their alias attributes. If username isn't an alias attribute in your user pool, this value must be the sub of a local user or the username of a user from a third-party IdP.
        public let username: String
        /// The ID of the user pool where you want to submit authentication-event feedback.
        public let userPoolId: String

        @inlinable
        public init(eventId: String, feedbackValue: FeedbackValueType, username: String, userPoolId: String) {
            self.eventId = eventId
            self.feedbackValue = feedbackValue
            self.username = username
            self.userPoolId = userPoolId
        }

        public func validate(name: String) throws {
            try self.validate(self.eventId, name: "eventId", parent: name, max: 50)
            try self.validate(self.eventId, name: "eventId", parent: name, min: 1)
            try self.validate(self.eventId, name: "eventId", parent: name, pattern: "^[\\w+-]+$")
            try self.validate(self.username, name: "username", parent: name, max: 128)
            try self.validate(self.username, name: "username", parent: name, min: 1)
            try self.validate(self.username, name: "username", parent: name, pattern: "^[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}]+$")
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, max: 55)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, min: 1)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, pattern: "^[\\w-]+_[0-9a-zA-Z]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case eventId = "EventId"
            case feedbackValue = "FeedbackValue"
            case username = "Username"
            case userPoolId = "UserPoolId"
        }
    }

    public struct AdminUpdateAuthEventFeedbackResponse: AWSDecodableShape {
        public init() {}
    }

    public struct AdminUpdateDeviceStatusRequest: AWSEncodableShape {
        /// The unique identifier, or device key, of the device that you want to update the status for.
        public let deviceKey: String
        /// To enable device authentication with the specified device, set to remembered.To disable, set to not_remembered.
        public let deviceRememberedStatus: DeviceRememberedStatusType?
        /// The name of the user that you want to query or modify. The value of this parameter is typically your user's username, but it can be any of their alias attributes. If username isn't an alias attribute in your user pool, this value must be the sub of a local user or the username of a user from a third-party IdP.
        public let username: String
        /// The ID of the user pool where you want to change a user's device status.
        public let userPoolId: String

        @inlinable
        public init(deviceKey: String, deviceRememberedStatus: DeviceRememberedStatusType? = nil, username: String, userPoolId: String) {
            self.deviceKey = deviceKey
            self.deviceRememberedStatus = deviceRememberedStatus
            self.username = username
            self.userPoolId = userPoolId
        }

        public func validate(name: String) throws {
            try self.validate(self.deviceKey, name: "deviceKey", parent: name, max: 55)
            try self.validate(self.deviceKey, name: "deviceKey", parent: name, min: 1)
            try self.validate(self.deviceKey, name: "deviceKey", parent: name, pattern: "^[\\w-]+_[0-9a-f-]+$")
            try self.validate(self.username, name: "username", parent: name, max: 128)
            try self.validate(self.username, name: "username", parent: name, min: 1)
            try self.validate(self.username, name: "username", parent: name, pattern: "^[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}]+$")
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, max: 55)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, min: 1)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, pattern: "^[\\w-]+_[0-9a-zA-Z]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case deviceKey = "DeviceKey"
            case deviceRememberedStatus = "DeviceRememberedStatus"
            case username = "Username"
            case userPoolId = "UserPoolId"
        }
    }

    public struct AdminUpdateDeviceStatusResponse: AWSDecodableShape {
        public init() {}
    }

    public struct AdminUpdateUserAttributesRequest: AWSEncodableShape {
        /// A map of custom key-value pairs that you can provide as input for any custom workflows that this action triggers. You create custom workflows by assigning Lambda functions to user pool triggers. When you use the AdminUpdateUserAttributes API action, Amazon Cognito invokes the function that is assigned to the custom message trigger. When Amazon Cognito invokes this function, it passes a JSON payload, which the function receives as input. This payload contains a clientMetadata attribute, which provides the data that you assigned to the ClientMetadata parameter in your AdminUpdateUserAttributes request. In your function code in Lambda, you can process the clientMetadata value to enhance your workflow for your specific needs. For more information, see
        /// Using Lambda triggers in the Amazon Cognito Developer Guide.  When you use the ClientMetadata parameter, note that Amazon Cognito won't do the following:   Store the ClientMetadata value. This data is available only to Lambda triggers that are assigned to a user pool to support custom workflows. If your user pool configuration doesn't include triggers, the ClientMetadata parameter serves no purpose.   Validate the ClientMetadata value.   Encrypt the ClientMetadata value. Don't send sensitive information in this parameter.
        public let clientMetadata: [String: String]?
        /// An array of name-value pairs representing user attributes. For custom attributes, you must prepend the custom: prefix to the attribute name. If your user pool requires verification before Amazon Cognito updates an attribute value that you specify in this request, Amazon Cognito doesn’t immediately update the value of that attribute. After your user receives and responds to a verification message to verify the new value, Amazon Cognito updates the attribute value. Your user can sign in and receive messages with the original attribute value until they verify the new value. To skip the verification message and update the value of an attribute that requires verification in the same API request, include the email_verified or phone_number_verified attribute, with a value of true. If you set the email_verified or phone_number_verified value for an email or phone_number attribute that requires verification to true, Amazon Cognito doesn’t send a verification message to your user.
        public let userAttributes: [AttributeType]
        /// The name of the user that you want to query or modify. The value of this parameter is typically your user's username, but it can be any of their alias attributes. If username isn't an alias attribute in your user pool, this value must be the sub of a local user or the username of a user from a third-party IdP.
        public let username: String
        /// The ID of the user pool where you want to update user attributes.
        public let userPoolId: String

        @inlinable
        public init(clientMetadata: [String: String]? = nil, userAttributes: [AttributeType], username: String, userPoolId: String) {
            self.clientMetadata = clientMetadata
            self.userAttributes = userAttributes
            self.username = username
            self.userPoolId = userPoolId
        }

        public func validate(name: String) throws {
            try self.clientMetadata?.forEach {
                try validate($0.key, name: "clientMetadata.key", parent: name, max: 131072)
                try validate($0.value, name: "clientMetadata[\"\($0.key)\"]", parent: name, max: 131072)
            }
            try self.userAttributes.forEach {
                try $0.validate(name: "\(name).userAttributes[]")
            }
            try self.validate(self.username, name: "username", parent: name, max: 128)
            try self.validate(self.username, name: "username", parent: name, min: 1)
            try self.validate(self.username, name: "username", parent: name, pattern: "^[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}]+$")
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, max: 55)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, min: 1)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, pattern: "^[\\w-]+_[0-9a-zA-Z]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case clientMetadata = "ClientMetadata"
            case userAttributes = "UserAttributes"
            case username = "Username"
            case userPoolId = "UserPoolId"
        }
    }

    public struct AdminUpdateUserAttributesResponse: AWSDecodableShape {
        public init() {}
    }

    public struct AdminUserGlobalSignOutRequest: AWSEncodableShape {
        /// The name of the user that you want to query or modify. The value of this parameter is typically your user's username, but it can be any of their alias attributes. If username isn't an alias attribute in your user pool, this value must be the sub of a local user or the username of a user from a third-party IdP.
        public let username: String
        /// The ID of the user pool where you want to sign out a user.
        public let userPoolId: String

        @inlinable
        public init(username: String, userPoolId: String) {
            self.username = username
            self.userPoolId = userPoolId
        }

        public func validate(name: String) throws {
            try self.validate(self.username, name: "username", parent: name, max: 128)
            try self.validate(self.username, name: "username", parent: name, min: 1)
            try self.validate(self.username, name: "username", parent: name, pattern: "^[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}]+$")
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, max: 55)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, min: 1)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, pattern: "^[\\w-]+_[0-9a-zA-Z]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case username = "Username"
            case userPoolId = "UserPoolId"
        }
    }

    public struct AdminUserGlobalSignOutResponse: AWSDecodableShape {
        public init() {}
    }

    public struct AdvancedSecurityAdditionalFlowsType: AWSEncodableShape & AWSDecodableShape {
        /// The operating mode of threat protection in custom authentication with  Custom authentication challenge Lambda triggers.
        public let customAuthMode: AdvancedSecurityEnabledModeType?

        @inlinable
        public init(customAuthMode: AdvancedSecurityEnabledModeType? = nil) {
            self.customAuthMode = customAuthMode
        }

        private enum CodingKeys: String, CodingKey {
            case customAuthMode = "CustomAuthMode"
        }
    }

    public struct AnalyticsConfigurationType: AWSEncodableShape & AWSDecodableShape {
        /// The Amazon Resource Name (ARN) of an Amazon Pinpoint project that you want to connect to your user pool app client. Amazon Cognito publishes events to the Amazon Pinpoint project that ApplicationArn declares. You can also configure your application to pass an endpoint ID in the AnalyticsMetadata parameter of sign-in operations. The endpoint ID is information about the destination for push notifications
        public let applicationArn: String?
        /// Your Amazon Pinpoint project ID.
        public let applicationId: String?
        /// The external ID of the role that Amazon Cognito assumes to send analytics data to Amazon Pinpoint.
        public let externalId: String?
        /// The ARN of an Identity and Access Management role that has the permissions required for Amazon Cognito to publish events to Amazon Pinpoint analytics.
        public let roleArn: String?
        /// If UserDataShared is true, Amazon Cognito includes user data in the events that it publishes to Amazon Pinpoint analytics.
        public let userDataShared: Bool?

        @inlinable
        public init(applicationArn: String? = nil, applicationId: String? = nil, externalId: String? = nil, roleArn: String? = nil, userDataShared: Bool? = nil) {
            self.applicationArn = applicationArn
            self.applicationId = applicationId
            self.externalId = externalId
            self.roleArn = roleArn
            self.userDataShared = userDataShared
        }

        public func validate(name: String) throws {
            try self.validate(self.applicationArn, name: "applicationArn", parent: name, max: 2048)
            try self.validate(self.applicationArn, name: "applicationArn", parent: name, min: 20)
            try self.validate(self.applicationArn, name: "applicationArn", parent: name, pattern: "^arn:[\\w+=/,.@-]+:[\\w+=/,.@-]+:([\\w+=/,.@-]*)?:[0-9]+:[\\w+=/,.@-]+(:[\\w+=/,.@-]+)?(:[\\w+=/,.@-]+)?$")
            try self.validate(self.applicationId, name: "applicationId", parent: name, pattern: "^[0-9a-fA-F]+$")
            try self.validate(self.externalId, name: "externalId", parent: name, max: 131072)
            try self.validate(self.roleArn, name: "roleArn", parent: name, max: 2048)
            try self.validate(self.roleArn, name: "roleArn", parent: name, min: 20)
            try self.validate(self.roleArn, name: "roleArn", parent: name, pattern: "^arn:[\\w+=/,.@-]+:[\\w+=/,.@-]+:([\\w+=/,.@-]*)?:[0-9]+:[\\w+=/,.@-]+(:[\\w+=/,.@-]+)?(:[\\w+=/,.@-]+)?$")
        }

        private enum CodingKeys: String, CodingKey {
            case applicationArn = "ApplicationArn"
            case applicationId = "ApplicationId"
            case externalId = "ExternalId"
            case roleArn = "RoleArn"
            case userDataShared = "UserDataShared"
        }
    }

    public struct AnalyticsMetadataType: AWSEncodableShape {
        /// The endpoint ID. Information that you want to pass to Amazon Pinpoint about where to send notifications.
        public let analyticsEndpointId: String?

        @inlinable
        public init(analyticsEndpointId: String? = nil) {
            self.analyticsEndpointId = analyticsEndpointId
        }

        public func validate(name: String) throws {
            try self.validate(self.analyticsEndpointId, name: "analyticsEndpointId", parent: name, max: 131072)
        }

        private enum CodingKeys: String, CodingKey {
            case analyticsEndpointId = "AnalyticsEndpointId"
        }
    }

    public struct AssetType: AWSEncodableShape & AWSDecodableShape {
        /// The image file, in Base64-encoded binary.
        public let bytes: AWSBase64Data?
        /// The category that the image corresponds to in your managed login configuration. Managed login has asset categories for different types of logos, backgrounds, and icons.
        public let category: AssetCategoryType
        /// The display-mode target of the asset: light, dark, or browser-adaptive. For example, Amazon Cognito displays a dark-mode image only when the browser or application is in dark mode, but displays a browser-adaptive file in all contexts.
        public let colorMode: ColorSchemeModeType
        /// The file type of the image file.
        public let `extension`: AssetExtensionType
        /// The ID of the asset.
        public let resourceId: String?

        @inlinable
        public init(bytes: AWSBase64Data? = nil, category: AssetCategoryType, colorMode: ColorSchemeModeType, extension: AssetExtensionType, resourceId: String? = nil) {
            self.bytes = bytes
            self.category = category
            self.colorMode = colorMode
            self.`extension` = `extension`
            self.resourceId = resourceId
        }

        public func validate(name: String) throws {
            try self.validate(self.bytes, name: "bytes", parent: name, max: 1000000)
            try self.validate(self.resourceId, name: "resourceId", parent: name, max: 40)
            try self.validate(self.resourceId, name: "resourceId", parent: name, min: 1)
            try self.validate(self.resourceId, name: "resourceId", parent: name, pattern: "^[\\w\\- ]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case bytes = "Bytes"
            case category = "Category"
            case colorMode = "ColorMode"
            case `extension` = "Extension"
            case resourceId = "ResourceId"
        }
    }

    public struct AssociateSoftwareTokenRequest: AWSEncodableShape {
        /// A valid access token that Amazon Cognito issued to the currently signed-in user. Must include a scope claim for
        /// aws.cognito.signin.user.admin. You can provide either an access token or a session ID in the request.
        public let accessToken: String?
        /// The session identifier that maintains the state of authentication requests and challenge responses. In AssociateSoftwareToken, this is the session ID from a successful sign-in. You can provide either an access token or a session ID in the request.
        public let session: String?

        @inlinable
        public init(accessToken: String? = nil, session: String? = nil) {
            self.accessToken = accessToken
            self.session = session
        }

        public func validate(name: String) throws {
            try self.validate(self.accessToken, name: "accessToken", parent: name, pattern: "^[A-Za-z0-9-_=.]+$")
            try self.validate(self.session, name: "session", parent: name, max: 2048)
            try self.validate(self.session, name: "session", parent: name, min: 20)
        }

        private enum CodingKeys: String, CodingKey {
            case accessToken = "AccessToken"
            case session = "Session"
        }
    }

    public struct AssociateSoftwareTokenResponse: AWSDecodableShape {
        /// A unique generated shared secret code that is used by the TOTP algorithm to generate a one-time code.
        public let secretCode: String?
        /// The session identifier that maintains the state of authentication requests and challenge responses.
        public let session: String?

        @inlinable
        public init(secretCode: String? = nil, session: String? = nil) {
            self.secretCode = secretCode
            self.session = session
        }

        private enum CodingKeys: String, CodingKey {
            case secretCode = "SecretCode"
            case session = "Session"
        }
    }

    public struct AttributeType: AWSEncodableShape & AWSDecodableShape {
        /// The name of the attribute.
        public let name: String
        /// The value of the attribute.
        public let value: String?

        @inlinable
        public init(name: String, value: String? = nil) {
            self.name = name
            self.value = value
        }

        public func validate(name: String) throws {
            try self.validate(self.name, name: "name", parent: name, max: 32)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}]+$")
            try self.validate(self.value, name: "value", parent: name, max: 2048)
        }

        private enum CodingKeys: String, CodingKey {
            case name = "Name"
            case value = "Value"
        }
    }

    public struct AuthEventType: AWSDecodableShape {
        /// A list of the challenges that the user was requested to answer, for example Password, and the result, for example Success.
        public let challengeResponses: [ChallengeResponseType]?
        /// The date and time when the item was created. Amazon Cognito returns this timestamp in UNIX epoch time format. Your SDK might render the output in a
        /// human-readable format like ISO 8601 or a Java Date object.
        public let creationDate: Date?
        /// The user context data captured at the time of an event request. This value provides additional information about the client from which event the request is received.
        public let eventContextData: EventContextDataType?
        /// The UpdateAuthEventFeedback or AdminUpdateAuthEventFeedback feedback that you or your user provided in response to the event. A value of Valid indicates that you disagreed with the level of risk that your user pool assigned, and evaluated a session to be valid, or likely safe. A value of Invalid indicates that you agreed with the user pool risk level and evaluated a session to be invalid, or likely malicious.
        public let eventFeedback: EventFeedbackType?
        /// The event ID.
        public let eventId: String?
        /// The event response.
        public let eventResponse: EventResponseType?
        /// The threat evaluation from your user pool about an event. Contains information about whether your user pool detected compromised credentials, whether the event triggered an automated response, and the level of risk.
        public let eventRisk: EventRiskType?
        /// The type of authentication event.
        public let eventType: EventType?

        @inlinable
        public init(challengeResponses: [ChallengeResponseType]? = nil, creationDate: Date? = nil, eventContextData: EventContextDataType? = nil, eventFeedback: EventFeedbackType? = nil, eventId: String? = nil, eventResponse: EventResponseType? = nil, eventRisk: EventRiskType? = nil, eventType: EventType? = nil) {
            self.challengeResponses = challengeResponses
            self.creationDate = creationDate
            self.eventContextData = eventContextData
            self.eventFeedback = eventFeedback
            self.eventId = eventId
            self.eventResponse = eventResponse
            self.eventRisk = eventRisk
            self.eventType = eventType
        }

        private enum CodingKeys: String, CodingKey {
            case challengeResponses = "ChallengeResponses"
            case creationDate = "CreationDate"
            case eventContextData = "EventContextData"
            case eventFeedback = "EventFeedback"
            case eventId = "EventId"
            case eventResponse = "EventResponse"
            case eventRisk = "EventRisk"
            case eventType = "EventType"
        }
    }

    public struct AuthenticationResultType: AWSDecodableShape {
        /// Your user's access token.
        public let accessToken: String?
        /// The expiration period of the authentication result in seconds.
        public let expiresIn: Int?
        /// Your user's ID token.
        public let idToken: String?
        /// The new device metadata from an authentication result.
        public let newDeviceMetadata: NewDeviceMetadataType?
        /// Your user's refresh token.
        public let refreshToken: String?
        /// The intended use of the token, for example Bearer.
        public let tokenType: String?

        @inlinable
        public init(accessToken: String? = nil, expiresIn: Int? = nil, idToken: String? = nil, newDeviceMetadata: NewDeviceMetadataType? = nil, refreshToken: String? = nil, tokenType: String? = nil) {
            self.accessToken = accessToken
            self.expiresIn = expiresIn
            self.idToken = idToken
            self.newDeviceMetadata = newDeviceMetadata
            self.refreshToken = refreshToken
            self.tokenType = tokenType
        }

        private enum CodingKeys: String, CodingKey {
            case accessToken = "AccessToken"
            case expiresIn = "ExpiresIn"
            case idToken = "IdToken"
            case newDeviceMetadata = "NewDeviceMetadata"
            case refreshToken = "RefreshToken"
            case tokenType = "TokenType"
        }
    }

    public struct ChallengeResponseType: AWSDecodableShape {
        /// The type of challenge that your previous authentication request returned in the parameter ChallengeName, for example SMS_MFA.
        public let challengeName: ChallengeName?
        /// The set of key-value pairs that provides a response to the requested challenge.
        public let challengeResponse: ChallengeResponse?

        @inlinable
        public init(challengeName: ChallengeName? = nil, challengeResponse: ChallengeResponse? = nil) {
            self.challengeName = challengeName
            self.challengeResponse = challengeResponse
        }

        private enum CodingKeys: String, CodingKey {
            case challengeName = "ChallengeName"
            case challengeResponse = "ChallengeResponse"
        }
    }

    public struct ChangePasswordRequest: AWSEncodableShape {
        /// A valid access token that Amazon Cognito issued to the user whose password you want to change.
        public let accessToken: String
        /// The user's previous password. Required if the user has a password. If the user has no password and only signs in with passwordless authentication options, you can omit this parameter.
        public let previousPassword: String?
        /// A new password that you prompted the user to enter in your application.
        public let proposedPassword: String

        @inlinable
        public init(accessToken: String, previousPassword: String? = nil, proposedPassword: String) {
            self.accessToken = accessToken
            self.previousPassword = previousPassword
            self.proposedPassword = proposedPassword
        }

        public func validate(name: String) throws {
            try self.validate(self.accessToken, name: "accessToken", parent: name, pattern: "^[A-Za-z0-9-_=.]+$")
            try self.validate(self.previousPassword, name: "previousPassword", parent: name, max: 256)
            try self.validate(self.previousPassword, name: "previousPassword", parent: name, pattern: "^[\\S]+$")
            try self.validate(self.proposedPassword, name: "proposedPassword", parent: name, max: 256)
            try self.validate(self.proposedPassword, name: "proposedPassword", parent: name, pattern: "^[\\S]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case accessToken = "AccessToken"
            case previousPassword = "PreviousPassword"
            case proposedPassword = "ProposedPassword"
        }
    }

    public struct ChangePasswordResponse: AWSDecodableShape {
        public init() {}
    }

    public struct CloudWatchLogsConfigurationType: AWSEncodableShape & AWSDecodableShape {
        /// The Amazon Resource Name (arn) of a CloudWatch Logs log group where your user pool sends logs. The log group must not be encrypted with Key Management Service and must be in the same Amazon Web Services account as your user pool. To send logs to log groups with a resource policy of a size greater than 5120 characters, configure a log group with a path that starts with /aws/vendedlogs. For more information, see Enabling logging from certain Amazon Web Services services.
        public let logGroupArn: String?

        @inlinable
        public init(logGroupArn: String? = nil) {
            self.logGroupArn = logGroupArn
        }

        public func validate(name: String) throws {
            try self.validate(self.logGroupArn, name: "logGroupArn", parent: name, max: 2048)
            try self.validate(self.logGroupArn, name: "logGroupArn", parent: name, min: 20)
            try self.validate(self.logGroupArn, name: "logGroupArn", parent: name, pattern: "^arn:[\\w+=/,.@-]+:[\\w+=/,.@-]+:([\\w+=/,.@-]*)?:[0-9]+:[\\w+=/,.@-]+(:[\\w+=/,.@-]+)?(:[\\w+=/,.@-]+)?$")
        }

        private enum CodingKeys: String, CodingKey {
            case logGroupArn = "LogGroupArn"
        }
    }

    public struct CodeDeliveryDetailsType: AWSDecodableShape {
        /// The name of the attribute that Amazon Cognito verifies with the code.
        public let attributeName: String?
        /// The method that Amazon Cognito used to send the code.
        public let deliveryMedium: DeliveryMediumType?
        /// The email address or phone number destination where Amazon Cognito sent the code.
        public let destination: String?

        @inlinable
        public init(attributeName: String? = nil, deliveryMedium: DeliveryMediumType? = nil, destination: String? = nil) {
            self.attributeName = attributeName
            self.deliveryMedium = deliveryMedium
            self.destination = destination
        }

        private enum CodingKeys: String, CodingKey {
            case attributeName = "AttributeName"
            case deliveryMedium = "DeliveryMedium"
            case destination = "Destination"
        }
    }

    public struct CompleteWebAuthnRegistrationRequest: AWSEncodableShape {
        /// A valid access token that Amazon Cognito issued to the currently signed-in user. Must include a scope claim for
        /// aws.cognito.signin.user.admin.
        public let accessToken: String
        /// A RegistrationResponseJSON public-key credential response from the user's passkey provider.
        public let credential: AWSDocument

        @inlinable
        public init(accessToken: String, credential: AWSDocument) {
            self.accessToken = accessToken
            self.credential = credential
        }

        public func validate(name: String) throws {
            try self.validate(self.accessToken, name: "accessToken", parent: name, pattern: "^[A-Za-z0-9-_=.]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case accessToken = "AccessToken"
            case credential = "Credential"
        }
    }

    public struct CompleteWebAuthnRegistrationResponse: AWSDecodableShape {
        public init() {}
    }

    public struct CompromisedCredentialsActionsType: AWSEncodableShape & AWSDecodableShape {
        /// The action that Amazon Cognito takes when it detects compromised credentials.
        public let eventAction: CompromisedCredentialsEventActionType

        @inlinable
        public init(eventAction: CompromisedCredentialsEventActionType) {
            self.eventAction = eventAction
        }

        private enum CodingKeys: String, CodingKey {
            case eventAction = "EventAction"
        }
    }

    public struct CompromisedCredentialsRiskConfigurationType: AWSEncodableShape & AWSDecodableShape {
        /// Settings for the actions that you want your user pool to take when Amazon Cognito detects compromised credentials.
        public let actions: CompromisedCredentialsActionsType
        /// Settings for the sign-in activity where you want to configure compromised-credentials actions. Defaults to all events.
        public let eventFilter: [EventFilterType]?

        @inlinable
        public init(actions: CompromisedCredentialsActionsType, eventFilter: [EventFilterType]? = nil) {
            self.actions = actions
            self.eventFilter = eventFilter
        }

        private enum CodingKeys: String, CodingKey {
            case actions = "Actions"
            case eventFilter = "EventFilter"
        }
    }

    public struct ConfirmDeviceRequest: AWSEncodableShape {
        /// A valid access token that Amazon Cognito issued to the currently signed-in user. Must include a scope claim for
        /// aws.cognito.signin.user.admin.
        public let accessToken: String
        /// The unique identifier, or device key, of the device that you want to update the status for.
        public let deviceKey: String
        /// A friendly name for the device, for example MyMobilePhone.
        public let deviceName: String?
        /// The configuration of the device secret verifier.
        public let deviceSecretVerifierConfig: DeviceSecretVerifierConfigType?

        @inlinable
        public init(accessToken: String, deviceKey: String, deviceName: String? = nil, deviceSecretVerifierConfig: DeviceSecretVerifierConfigType? = nil) {
            self.accessToken = accessToken
            self.deviceKey = deviceKey
            self.deviceName = deviceName
            self.deviceSecretVerifierConfig = deviceSecretVerifierConfig
        }

        public func validate(name: String) throws {
            try self.validate(self.accessToken, name: "accessToken", parent: name, pattern: "^[A-Za-z0-9-_=.]+$")
            try self.validate(self.deviceKey, name: "deviceKey", parent: name, max: 55)
            try self.validate(self.deviceKey, name: "deviceKey", parent: name, min: 1)
            try self.validate(self.deviceKey, name: "deviceKey", parent: name, pattern: "^[\\w-]+_[0-9a-f-]+$")
            try self.validate(self.deviceName, name: "deviceName", parent: name, max: 1024)
            try self.validate(self.deviceName, name: "deviceName", parent: name, min: 1)
            try self.deviceSecretVerifierConfig?.validate(name: "\(name).deviceSecretVerifierConfig")
        }

        private enum CodingKeys: String, CodingKey {
            case accessToken = "AccessToken"
            case deviceKey = "DeviceKey"
            case deviceName = "DeviceName"
            case deviceSecretVerifierConfig = "DeviceSecretVerifierConfig"
        }
    }

    public struct ConfirmDeviceResponse: AWSDecodableShape {
        /// When true, your user must confirm that they want to remember the device. Prompt the user for an answer. When false, immediately sets the device as remembered and eligible for device authentication. You can configure your user pool to always remember devices, in which case this response is false, or to allow users to opt in, in which case this response is true. Configure this option under Device tracking in the Sign-in menu of your user pool.
        public let userConfirmationNecessary: Bool?

        @inlinable
        public init(userConfirmationNecessary: Bool? = nil) {
            self.userConfirmationNecessary = userConfirmationNecessary
        }

        private enum CodingKeys: String, CodingKey {
            case userConfirmationNecessary = "UserConfirmationNecessary"
        }
    }

    public struct ConfirmForgotPasswordRequest: AWSEncodableShape {
        /// Information that supports analytics outcomes with Amazon Pinpoint, including the
        /// user's endpoint ID. The endpoint ID is a destination for Amazon Pinpoint push notifications, for example a device identifier,
        /// email address, or phone number.
        public let analyticsMetadata: AnalyticsMetadataType?
        /// The ID of the app client where the user wants to reset their password. This parameter is an identifier of the client application that users are resetting their password from, but this operation resets users' irrespective of the app clients they sign in to.
        public let clientId: String
        /// A map of custom key-value pairs that you can provide as input for any custom workflows that this action triggers. You create custom workflows by assigning Lambda functions to user pool triggers. When you use the ConfirmForgotPassword API action, Amazon Cognito invokes the function that is assigned to the post confirmation trigger. When Amazon Cognito invokes this function, it passes a JSON payload, which the function receives as input. This payload contains a clientMetadata attribute, which provides the data that you assigned to the ClientMetadata parameter in your ConfirmForgotPassword request. In your function code in Lambda, you can process the clientMetadata value to enhance your workflow for your specific needs. For more information, see
        /// Using Lambda triggers in the Amazon Cognito Developer Guide.  When you use the ClientMetadata parameter, note that Amazon Cognito won't do the following:   Store the ClientMetadata value. This data is available only to Lambda triggers that are assigned to a user pool to support custom workflows. If your user pool configuration doesn't include triggers, the ClientMetadata parameter serves no purpose.   Validate the ClientMetadata value.   Encrypt the ClientMetadata value. Don't send sensitive information in this parameter.
        public let clientMetadata: [String: String]?
        /// The confirmation code that your user pool delivered when your user requested to reset their password.
        public let confirmationCode: String
        /// The new password that your user wants to set.
        public let password: String
        /// A keyed-hash message authentication code (HMAC) calculated using the secret key of a user pool client and username plus the client ID in the message. For more information about SecretHash, see Computing secret hash values.
        public let secretHash: String?
        /// Contextual data about your user session like the device fingerprint, IP address, or location. Amazon Cognito threat
        /// protection evaluates the risk of an authentication event based on the context that your app generates and passes to Amazon Cognito
        /// when it makes API requests. For more information, see Collecting data for threat protection in
        /// applications.
        public let userContextData: UserContextDataType?
        /// The name of the user that you want to query or modify. The value of this parameter is typically your user's username, but it can be any of their alias attributes. If username isn't an alias attribute in your user pool, this value must be the sub of a local user or the username of a user from a third-party IdP.
        public let username: String

        @inlinable
        public init(analyticsMetadata: AnalyticsMetadataType? = nil, clientId: String, clientMetadata: [String: String]? = nil, confirmationCode: String, password: String, secretHash: String? = nil, userContextData: UserContextDataType? = nil, username: String) {
            self.analyticsMetadata = analyticsMetadata
            self.clientId = clientId
            self.clientMetadata = clientMetadata
            self.confirmationCode = confirmationCode
            self.password = password
            self.secretHash = secretHash
            self.userContextData = userContextData
            self.username = username
        }

        public func validate(name: String) throws {
            try self.analyticsMetadata?.validate(name: "\(name).analyticsMetadata")
            try self.validate(self.clientId, name: "clientId", parent: name, max: 128)
            try self.validate(self.clientId, name: "clientId", parent: name, min: 1)
            try self.validate(self.clientId, name: "clientId", parent: name, pattern: "^[\\w+]+$")
            try self.clientMetadata?.forEach {
                try validate($0.key, name: "clientMetadata.key", parent: name, max: 131072)
                try validate($0.value, name: "clientMetadata[\"\($0.key)\"]", parent: name, max: 131072)
            }
            try self.validate(self.confirmationCode, name: "confirmationCode", parent: name, max: 2048)
            try self.validate(self.confirmationCode, name: "confirmationCode", parent: name, min: 1)
            try self.validate(self.confirmationCode, name: "confirmationCode", parent: name, pattern: "^[\\S]+$")
            try self.validate(self.password, name: "password", parent: name, max: 256)
            try self.validate(self.password, name: "password", parent: name, pattern: "^[\\S]+$")
            try self.validate(self.secretHash, name: "secretHash", parent: name, max: 128)
            try self.validate(self.secretHash, name: "secretHash", parent: name, min: 1)
            try self.validate(self.secretHash, name: "secretHash", parent: name, pattern: "^[\\w+=/]+$")
            try self.userContextData?.validate(name: "\(name).userContextData")
            try self.validate(self.username, name: "username", parent: name, max: 128)
            try self.validate(self.username, name: "username", parent: name, min: 1)
            try self.validate(self.username, name: "username", parent: name, pattern: "^[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case analyticsMetadata = "AnalyticsMetadata"
            case clientId = "ClientId"
            case clientMetadata = "ClientMetadata"
            case confirmationCode = "ConfirmationCode"
            case password = "Password"
            case secretHash = "SecretHash"
            case userContextData = "UserContextData"
            case username = "Username"
        }
    }

    public struct ConfirmForgotPasswordResponse: AWSDecodableShape {
        public init() {}
    }

    public struct ConfirmSignUpRequest: AWSEncodableShape {
        /// Information that supports analytics outcomes with Amazon Pinpoint, including the
        /// user's endpoint ID. The endpoint ID is a destination for Amazon Pinpoint push notifications, for example a device identifier,
        /// email address, or phone number.
        public let analyticsMetadata: AnalyticsMetadataType?
        /// The ID of the app client associated with the user pool.
        public let clientId: String
        /// A map of custom key-value pairs that you can provide as input for any custom workflows that this action triggers. You create custom workflows by assigning Lambda functions to user pool triggers. When you use the ConfirmSignUp API action, Amazon Cognito invokes the function that is assigned to the post confirmation trigger. When Amazon Cognito invokes this function, it passes a JSON payload, which the function receives as input. This payload contains a clientMetadata attribute, which provides the data that you assigned to the ClientMetadata parameter in your ConfirmSignUp request. In your function code in Lambda, you can process the clientMetadata value to enhance your workflow for your specific needs. For more information, see
        /// Using Lambda triggers in the Amazon Cognito Developer Guide.  When you use the ClientMetadata parameter, note that Amazon Cognito won't do the following:   Store the ClientMetadata value. This data is available only to Lambda triggers that are assigned to a user pool to support custom workflows. If your user pool configuration doesn't include triggers, the ClientMetadata parameter serves no purpose.   Validate the ClientMetadata value.   Encrypt the ClientMetadata value. Don't send sensitive information in this parameter.
        public let clientMetadata: [String: String]?
        /// The confirmation code that your user pool sent in response to the SignUp request.
        public let confirmationCode: String
        /// When true, forces user confirmation despite any existing aliases. Defaults to false. A value of true migrates the alias from an existing user to the new user if an existing user already has the phone number or email address as an alias. Say, for example, that an existing user has an email attribute of bob@example.com and email is an alias in your user pool. If the new user also has an email of bob@example.com and your ConfirmSignUp response sets ForceAliasCreation to true, the new user can sign in with a username of bob@example.com and the existing user can no longer do so. If false and an attribute belongs to an existing alias, this request returns an AliasExistsException error. For more information about sign-in aliases, see Customizing sign-in attributes.
        public let forceAliasCreation: Bool?
        /// A keyed-hash message authentication code (HMAC) calculated using the secret key of a user pool client and username plus the client ID in the message. For more information about SecretHash, see Computing secret hash values.
        public let secretHash: String?
        /// The optional session ID from a SignUp API request. You can sign in a user directly from the sign-up process with the USER_AUTH authentication flow.
        public let session: String?
        /// Contextual data about your user session like the device fingerprint, IP address, or location. Amazon Cognito threat
        /// protection evaluates the risk of an authentication event based on the context that your app generates and passes to Amazon Cognito
        /// when it makes API requests. For more information, see Collecting data for threat protection in
        /// applications.
        public let userContextData: UserContextDataType?
        /// The name of the user that you want to query or modify. The value of this parameter is typically your user's username, but it can be any of their alias attributes. If username isn't an alias attribute in your user pool, this value must be the sub of a local user or the username of a user from a third-party IdP.
        public let username: String

        @inlinable
        public init(analyticsMetadata: AnalyticsMetadataType? = nil, clientId: String, clientMetadata: [String: String]? = nil, confirmationCode: String, forceAliasCreation: Bool? = nil, secretHash: String? = nil, session: String? = nil, userContextData: UserContextDataType? = nil, username: String) {
            self.analyticsMetadata = analyticsMetadata
            self.clientId = clientId
            self.clientMetadata = clientMetadata
            self.confirmationCode = confirmationCode
            self.forceAliasCreation = forceAliasCreation
            self.secretHash = secretHash
            self.session = session
            self.userContextData = userContextData
            self.username = username
        }

        public func validate(name: String) throws {
            try self.analyticsMetadata?.validate(name: "\(name).analyticsMetadata")
            try self.validate(self.clientId, name: "clientId", parent: name, max: 128)
            try self.validate(self.clientId, name: "clientId", parent: name, min: 1)
            try self.validate(self.clientId, name: "clientId", parent: name, pattern: "^[\\w+]+$")
            try self.clientMetadata?.forEach {
                try validate($0.key, name: "clientMetadata.key", parent: name, max: 131072)
                try validate($0.value, name: "clientMetadata[\"\($0.key)\"]", parent: name, max: 131072)
            }
            try self.validate(self.confirmationCode, name: "confirmationCode", parent: name, max: 2048)
            try self.validate(self.confirmationCode, name: "confirmationCode", parent: name, min: 1)
            try self.validate(self.confirmationCode, name: "confirmationCode", parent: name, pattern: "^[\\S]+$")
            try self.validate(self.secretHash, name: "secretHash", parent: name, max: 128)
            try self.validate(self.secretHash, name: "secretHash", parent: name, min: 1)
            try self.validate(self.secretHash, name: "secretHash", parent: name, pattern: "^[\\w+=/]+$")
            try self.validate(self.session, name: "session", parent: name, max: 2048)
            try self.validate(self.session, name: "session", parent: name, min: 20)
            try self.userContextData?.validate(name: "\(name).userContextData")
            try self.validate(self.username, name: "username", parent: name, max: 128)
            try self.validate(self.username, name: "username", parent: name, min: 1)
            try self.validate(self.username, name: "username", parent: name, pattern: "^[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case analyticsMetadata = "AnalyticsMetadata"
            case clientId = "ClientId"
            case clientMetadata = "ClientMetadata"
            case confirmationCode = "ConfirmationCode"
            case forceAliasCreation = "ForceAliasCreation"
            case secretHash = "SecretHash"
            case session = "Session"
            case userContextData = "UserContextData"
            case username = "Username"
        }
    }

    public struct ConfirmSignUpResponse: AWSDecodableShape {
        /// A session identifier that you can use to immediately sign in the confirmed user. You can automatically sign users in with the one-time password that they provided in a successful ConfirmSignUp request.
        public let session: String?

        @inlinable
        public init(session: String? = nil) {
            self.session = session
        }

        private enum CodingKeys: String, CodingKey {
            case session = "Session"
        }
    }

    public struct ContextDataType: AWSEncodableShape {
        /// Encoded device-fingerprint details that your app collected with the Amazon Cognito context data collection library. For more information, see Adding user device and session data to API requests.
        public let encodedData: String?
        /// The HTTP headers from your user's authentication request.
        public let httpHeaders: [HttpHeader]
        /// The source IP address of your user's device.
        public let ipAddress: String
        /// The name of your application's service endpoint.
        public let serverName: String
        /// The path of your application's service endpoint.
        public let serverPath: String

        @inlinable
        public init(encodedData: String? = nil, httpHeaders: [HttpHeader], ipAddress: String, serverName: String, serverPath: String) {
            self.encodedData = encodedData
            self.httpHeaders = httpHeaders
            self.ipAddress = ipAddress
            self.serverName = serverName
            self.serverPath = serverPath
        }

        public func validate(name: String) throws {
            try self.validate(self.encodedData, name: "encodedData", parent: name, max: 131072)
            try self.httpHeaders.forEach {
                try $0.validate(name: "\(name).httpHeaders[]")
            }
            try self.validate(self.ipAddress, name: "ipAddress", parent: name, max: 131072)
            try self.validate(self.serverName, name: "serverName", parent: name, max: 131072)
            try self.validate(self.serverPath, name: "serverPath", parent: name, max: 131072)
        }

        private enum CodingKeys: String, CodingKey {
            case encodedData = "EncodedData"
            case httpHeaders = "HttpHeaders"
            case ipAddress = "IpAddress"
            case serverName = "ServerName"
            case serverPath = "ServerPath"
        }
    }

    public struct CreateGroupRequest: AWSEncodableShape {
        /// A description of the group that you're creating.
        public let description: String?
        /// A name for the group. This name must be unique in your user pool.
        public let groupName: String
        /// A non-negative integer value that specifies the precedence of this group relative to the other groups that a user can belong to in the user pool. Zero is the highest precedence value. Groups with lower Precedence values take precedence over groups with higher or null Precedence values. If a user belongs to two or more groups, it is the group with the lowest precedence value whose role ARN is given in the user's tokens for the cognito:roles and cognito:preferred_role claims. Two groups can have the same Precedence value. If this happens, neither group takes precedence over the other. If two groups with the same Precedence have the same role ARN, that role is used in the cognito:preferred_role claim in tokens for users in each group. If the two groups have different role ARNs, the cognito:preferred_role claim isn't set in users' tokens. The default Precedence value is null. The maximum Precedence value is 2^31-1.
        public let precedence: Int?
        /// The Amazon Resource Name (ARN) for the IAM role that you want to associate with the group. A group role primarily declares a preferred role for the credentials that you get from an identity pool. Amazon Cognito ID tokens have a cognito:preferred_role claim that presents the highest-precedence group that a user belongs to. Both ID and access tokens also contain a cognito:groups claim that list all the groups that a user is a member of.
        public let roleArn: String?
        /// The ID of the user pool where you want to create a user group.
        public let userPoolId: String

        @inlinable
        public init(description: String? = nil, groupName: String, precedence: Int? = nil, roleArn: String? = nil, userPoolId: String) {
            self.description = description
            self.groupName = groupName
            self.precedence = precedence
            self.roleArn = roleArn
            self.userPoolId = userPoolId
        }

        public func validate(name: String) throws {
            try self.validate(self.description, name: "description", parent: name, max: 2048)
            try self.validate(self.groupName, name: "groupName", parent: name, max: 128)
            try self.validate(self.groupName, name: "groupName", parent: name, min: 1)
            try self.validate(self.groupName, name: "groupName", parent: name, pattern: "^[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}]+$")
            try self.validate(self.precedence, name: "precedence", parent: name, min: 0)
            try self.validate(self.roleArn, name: "roleArn", parent: name, max: 2048)
            try self.validate(self.roleArn, name: "roleArn", parent: name, min: 20)
            try self.validate(self.roleArn, name: "roleArn", parent: name, pattern: "^arn:[\\w+=/,.@-]+:[\\w+=/,.@-]+:([\\w+=/,.@-]*)?:[0-9]+:[\\w+=/,.@-]+(:[\\w+=/,.@-]+)?(:[\\w+=/,.@-]+)?$")
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, max: 55)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, min: 1)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, pattern: "^[\\w-]+_[0-9a-zA-Z]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case description = "Description"
            case groupName = "GroupName"
            case precedence = "Precedence"
            case roleArn = "RoleArn"
            case userPoolId = "UserPoolId"
        }
    }

    public struct CreateGroupResponse: AWSDecodableShape {
        /// The response object for a created group.
        public let group: GroupType?

        @inlinable
        public init(group: GroupType? = nil) {
            self.group = group
        }

        private enum CodingKeys: String, CodingKey {
            case group = "Group"
        }
    }

    public struct CreateIdentityProviderRequest: AWSEncodableShape {
        /// A mapping of IdP attributes to standard and custom user pool attributes. Specify a user pool attribute as the key of the key-value pair, and the IdP attribute claim name as the value.
        public let attributeMapping: [String: String]?
        /// An array of IdP identifiers, for example "IdPIdentifiers": [ "MyIdP", "MyIdP2" ]. Identifiers are friendly names that you can pass in the idp_identifier query parameter of requests to the Authorize endpoint to silently redirect to sign-in with the associated IdP. Identifiers in a domain format also enable the use of email-address matching with SAML providers.
        public let idpIdentifiers: [String]?
        /// The scopes, URLs, and identifiers for your external identity provider. The following
        /// examples describe the provider detail keys for each IdP type. These values and their
        /// schema are subject to change. Social IdP authorize_scopes values must match
        /// the values listed here.  OpenID Connect (OIDC)  Amazon Cognito accepts the following elements when it can't discover endpoint URLs from oidc_issuer: attributes_url, authorize_url, jwks_uri, token_url. Create or update request: "ProviderDetails": { "attributes_request_method": "GET", "attributes_url": "https://auth.example.com/userInfo", "authorize_scopes": "openid profile email", "authorize_url": "https://auth.example.com/authorize", "client_id": "1example23456789", "client_secret": "provider-app-client-secret", "jwks_uri": "https://auth.example.com/.well-known/jwks.json", "oidc_issuer": "https://auth.example.com", "token_url": "https://example.com/token" }  Describe response: "ProviderDetails": { "attributes_request_method": "GET", "attributes_url": "https://auth.example.com/userInfo", "attributes_url_add_attributes": "false", "authorize_scopes": "openid profile email", "authorize_url": "https://auth.example.com/authorize", "client_id": "1example23456789", "client_secret": "provider-app-client-secret", "jwks_uri": "https://auth.example.com/.well-known/jwks.json", "oidc_issuer": "https://auth.example.com", "token_url": "https://example.com/token" }   SAML  Create or update request with Metadata URL: "ProviderDetails": { "IDPInit": "true", "IDPSignout": "true", "EncryptedResponses" : "true", "MetadataURL": "https://auth.example.com/sso/saml/metadata", "RequestSigningAlgorithm": "rsa-sha256" }  Create or update request with Metadata file: "ProviderDetails": { "IDPInit": "true", "IDPSignout": "true", "EncryptedResponses" : "true",   "MetadataFile": "[metadata XML]", "RequestSigningAlgorithm": "rsa-sha256" }  The value of MetadataFile must be the plaintext metadata document with all  quote (") characters escaped by backslashes. Describe response: "ProviderDetails": { "IDPInit": "true", "IDPSignout": "true", "EncryptedResponses" : "true", "ActiveEncryptionCertificate": "[certificate]", "MetadataURL": "https://auth.example.com/sso/saml/metadata", "RequestSigningAlgorithm": "rsa-sha256", "SLORedirectBindingURI": "https://auth.example.com/slo/saml", "SSORedirectBindingURI": "https://auth.example.com/sso/saml" }   LoginWithAmazon  Create or update request: "ProviderDetails": { "authorize_scopes": "profile postal_code", "client_id": "amzn1.application-oa2-client.1example23456789", "client_secret": "provider-app-client-secret"  Describe response: "ProviderDetails": { "attributes_url": "https://api.amazon.com/user/profile", "attributes_url_add_attributes": "false", "authorize_scopes": "profile postal_code", "authorize_url": "https://www.amazon.com/ap/oa", "client_id": "amzn1.application-oa2-client.1example23456789", "client_secret": "provider-app-client-secret", "token_request_method": "POST", "token_url": "https://api.amazon.com/auth/o2/token" }   Google  Create or update request: "ProviderDetails": { "authorize_scopes": "email profile openid", "client_id": "1example23456789.apps.googleusercontent.com", "client_secret": "provider-app-client-secret" }  Describe response: "ProviderDetails": { "attributes_url": "https://people.googleapis.com/v1/people/me?personFields=", "attributes_url_add_attributes": "true", "authorize_scopes": "email profile openid", "authorize_url": "https://accounts.google.com/o/oauth2/v2/auth", "client_id": "1example23456789.apps.googleusercontent.com", "client_secret": "provider-app-client-secret", "oidc_issuer": "https://accounts.google.com", "token_request_method": "POST", "token_url": "https://www.googleapis.com/oauth2/v4/token" }   SignInWithApple  Create or update request: "ProviderDetails": { "authorize_scopes": "email name", "client_id": "com.example.cognito", "private_key": "1EXAMPLE",  "key_id": "2EXAMPLE", "team_id": "3EXAMPLE" }  Describe response: "ProviderDetails": { "attributes_url_add_attributes": "false", "authorize_scopes": "email name", "authorize_url": "https://appleid.apple.com/auth/authorize", "client_id": "com.example.cognito", "key_id": "1EXAMPLE", "oidc_issuer": "https://appleid.apple.com", "team_id": "2EXAMPLE", "token_request_method": "POST", "token_url": "https://appleid.apple.com/auth/token" }   Facebook  Create or update request: "ProviderDetails": { "api_version": "v17.0",  "authorize_scopes": "public_profile, email", "client_id": "1example23456789",  "client_secret": "provider-app-client-secret" }  Describe response: "ProviderDetails":  { "api_version": "v17.0", "attributes_url": "https://graph.facebook.com/v17.0/me?fields=",  "attributes_url_add_attributes": "true", "authorize_scopes": "public_profile, email",  "authorize_url": "https://www.facebook.com/v17.0/dialog/oauth", "client_id":  "1example23456789", "client_secret": "provider-app-client-secret", "token_request_method":  "GET", "token_url": "https://graph.facebook.com/v17.0/oauth/access_token" }
        public let providerDetails: [String: String]
        /// The name that you want to assign to the IdP. You can pass the identity provider name in the identity_provider query parameter of requests to the Authorize endpoint to silently redirect to sign-in with the associated IdP.
        public let providerName: String
        /// The type of IdP that you want to add. Amazon Cognito supports OIDC, SAML 2.0, Login With Amazon, Sign In With Apple, Google, and Facebook IdPs.
        public let providerType: IdentityProviderTypeType
        /// The Id of the user pool where you want to create an IdP.
        public let userPoolId: String

        @inlinable
        public init(attributeMapping: [String: String]? = nil, idpIdentifiers: [String]? = nil, providerDetails: [String: String], providerName: String, providerType: IdentityProviderTypeType, userPoolId: String) {
            self.attributeMapping = attributeMapping
            self.idpIdentifiers = idpIdentifiers
            self.providerDetails = providerDetails
            self.providerName = providerName
            self.providerType = providerType
            self.userPoolId = userPoolId
        }

        public func validate(name: String) throws {
            try self.attributeMapping?.forEach {
                try validate($0.key, name: "attributeMapping.key", parent: name, max: 32)
                try validate($0.key, name: "attributeMapping.key", parent: name, min: 1)
                try validate($0.value, name: "attributeMapping[\"\($0.key)\"]", parent: name, max: 131072)
            }
            try self.idpIdentifiers?.forEach {
                try validate($0, name: "idpIdentifiers[]", parent: name, max: 40)
                try validate($0, name: "idpIdentifiers[]", parent: name, min: 1)
                try validate($0, name: "idpIdentifiers[]", parent: name, pattern: "^[\\w\\s+=.@-]+$")
            }
            try self.validate(self.idpIdentifiers, name: "idpIdentifiers", parent: name, max: 50)
            try self.providerDetails.forEach {
                try validate($0.key, name: "providerDetails.key", parent: name, max: 131072)
                try validate($0.value, name: "providerDetails[\"\($0.key)\"]", parent: name, max: 131072)
            }
            try self.validate(self.providerName, name: "providerName", parent: name, max: 32)
            try self.validate(self.providerName, name: "providerName", parent: name, min: 1)
            try self.validate(self.providerName, name: "providerName", parent: name, pattern: "^[^_\\p{Z}][\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}][^_\\p{Z}]+$")
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, max: 55)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, min: 1)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, pattern: "^[\\w-]+_[0-9a-zA-Z]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case attributeMapping = "AttributeMapping"
            case idpIdentifiers = "IdpIdentifiers"
            case providerDetails = "ProviderDetails"
            case providerName = "ProviderName"
            case providerType = "ProviderType"
            case userPoolId = "UserPoolId"
        }
    }

    public struct CreateIdentityProviderResponse: AWSDecodableShape {
        /// The details of the new user pool IdP.
        public let identityProvider: IdentityProviderType

        @inlinable
        public init(identityProvider: IdentityProviderType) {
            self.identityProvider = identityProvider
        }

        private enum CodingKeys: String, CodingKey {
            case identityProvider = "IdentityProvider"
        }
    }

    public struct CreateManagedLoginBrandingRequest: AWSEncodableShape {
        /// An array of image files that you want to apply to functions like backgrounds, logos, and icons. Each object must also indicate whether it is for dark mode, light mode, or browser-adaptive mode.
        public let assets: [AssetType]?
        /// The app client that you want to create the branding style for. Each style is linked to an app client until you delete it.
        public let clientId: String
        /// A JSON file, encoded as a Document type, with the the settings that you want to apply to your style. The following components are not currently implemented and reserved for future use:    signUp     instructions     sessionTimerDisplay     languageSelector (for localization, see Managed login localization)
        public let settings: AWSDocument?
        /// When true, applies the default branding style options. These default options are managed by Amazon Cognito. You can modify them later in the branding editor. When you specify true for this option, you must also omit values for Settings and Assets in the request.
        public let useCognitoProvidedValues: Bool?
        /// The ID of the user pool where you want to create a new branding style.
        public let userPoolId: String

        @inlinable
        public init(assets: [AssetType]? = nil, clientId: String, settings: AWSDocument? = nil, useCognitoProvidedValues: Bool? = nil, userPoolId: String) {
            self.assets = assets
            self.clientId = clientId
            self.settings = settings
            self.useCognitoProvidedValues = useCognitoProvidedValues
            self.userPoolId = userPoolId
        }

        public func validate(name: String) throws {
            try self.assets?.forEach {
                try $0.validate(name: "\(name).assets[]")
            }
            try self.validate(self.assets, name: "assets", parent: name, max: 40)
            try self.validate(self.clientId, name: "clientId", parent: name, max: 128)
            try self.validate(self.clientId, name: "clientId", parent: name, min: 1)
            try self.validate(self.clientId, name: "clientId", parent: name, pattern: "^[\\w+]+$")
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, max: 55)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, min: 1)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, pattern: "^[\\w-]+_[0-9a-zA-Z]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case assets = "Assets"
            case clientId = "ClientId"
            case settings = "Settings"
            case useCognitoProvidedValues = "UseCognitoProvidedValues"
            case userPoolId = "UserPoolId"
        }
    }

    public struct CreateManagedLoginBrandingResponse: AWSDecodableShape {
        /// The details of the branding style that you created.
        public let managedLoginBranding: ManagedLoginBrandingType?

        @inlinable
        public init(managedLoginBranding: ManagedLoginBrandingType? = nil) {
            self.managedLoginBranding = managedLoginBranding
        }

        private enum CodingKeys: String, CodingKey {
            case managedLoginBranding = "ManagedLoginBranding"
        }
    }

    public struct CreateResourceServerRequest: AWSEncodableShape {
        /// A unique resource server identifier for the resource server. The identifier can be an API friendly name like solar-system-data. You can also set an API URL like https://solar-system-data-api.example.com as your identifier. Amazon Cognito represents scopes in the access token in the format $resource-server-identifier/$scope. Longer scope-identifier strings increase the size of your access tokens.
        public let identifier: String
        /// A friendly name for the resource server.
        public let name: String
        /// A list of custom scopes. Each scope is a key-value map with the keys ScopeName and ScopeDescription. The name of a custom scope is a combination of ScopeName and the resource server Name in this request, for example MyResourceServerName/MyScopeName.
        public let scopes: [ResourceServerScopeType]?
        /// The ID of the user pool where you want to create a resource server.
        public let userPoolId: String

        @inlinable
        public init(identifier: String, name: String, scopes: [ResourceServerScopeType]? = nil, userPoolId: String) {
            self.identifier = identifier
            self.name = name
            self.scopes = scopes
            self.userPoolId = userPoolId
        }

        public func validate(name: String) throws {
            try self.validate(self.identifier, name: "identifier", parent: name, max: 256)
            try self.validate(self.identifier, name: "identifier", parent: name, min: 1)
            try self.validate(self.identifier, name: "identifier", parent: name, pattern: "^[\\x21\\x23-\\x5B\\x5D-\\x7E]+$")
            try self.validate(self.name, name: "name", parent: name, max: 256)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[\\w\\s+=,.@-]+$")
            try self.scopes?.forEach {
                try $0.validate(name: "\(name).scopes[]")
            }
            try self.validate(self.scopes, name: "scopes", parent: name, max: 100)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, max: 55)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, min: 1)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, pattern: "^[\\w-]+_[0-9a-zA-Z]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case identifier = "Identifier"
            case name = "Name"
            case scopes = "Scopes"
            case userPoolId = "UserPoolId"
        }
    }

    public struct CreateResourceServerResponse: AWSDecodableShape {
        /// The details of the new resource server.
        public let resourceServer: ResourceServerType

        @inlinable
        public init(resourceServer: ResourceServerType) {
            self.resourceServer = resourceServer
        }

        private enum CodingKeys: String, CodingKey {
            case resourceServer = "ResourceServer"
        }
    }

    public struct CreateTermsRequest: AWSEncodableShape {
        /// The ID of the app client where you want to create terms documents. Must be an app client in the requested user pool.
        public let clientId: String
        /// This parameter is reserved for future use and currently accepts only one value.
        public let enforcement: TermsEnforcementType
        /// A map of URLs to languages. For each localized language that will view the requested TermsName, assign a URL. A selection of cognito:default displays for all languages that don't have a language-specific URL. For example, "cognito:default": "https://terms.example.com", "cognito:spanish": "https://terms.example.com/es".
        public let links: [String: String]?
        /// A friendly name for the document that you want to create in the current request. Must begin with terms-of-use or privacy-policy as identification of the document type. Provide URLs for both terms-of-use and privacy-policy in separate requests.
        public let termsName: String
        /// This parameter is reserved for future use and currently accepts only one value.
        public let termsSource: TermsSourceType
        /// The ID of the user pool where you want to create terms documents.
        public let userPoolId: String

        @inlinable
        public init(clientId: String, enforcement: TermsEnforcementType, links: [String: String]? = nil, termsName: String, termsSource: TermsSourceType, userPoolId: String) {
            self.clientId = clientId
            self.enforcement = enforcement
            self.links = links
            self.termsName = termsName
            self.termsSource = termsSource
            self.userPoolId = userPoolId
        }

        public func validate(name: String) throws {
            try self.validate(self.clientId, name: "clientId", parent: name, max: 128)
            try self.validate(self.clientId, name: "clientId", parent: name, min: 1)
            try self.validate(self.clientId, name: "clientId", parent: name, pattern: "^[\\w+]+$")
            try self.links?.forEach {
                try validate($0.key, name: "links.key", parent: name, pattern: "^cognito:(default|english|french|spanish|german|bahasa-indonesia|italian|japanese|korean|portuguese-brazil|chinese-(simplified|traditional))$")
                try validate($0.value, name: "links[\"\($0.key)\"]", parent: name, max: 1024)
                try validate($0.value, name: "links[\"\($0.key)\"]", parent: name, min: 1)
                try validate($0.value, name: "links[\"\($0.key)\"]", parent: name, pattern: "^[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}]+$")
            }
            try self.validate(self.links, name: "links", parent: name, max: 12)
            try self.validate(self.links, name: "links", parent: name, min: 1)
            try self.validate(self.termsName, name: "termsName", parent: name, pattern: "^(terms-of-use|privacy-policy)$")
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, max: 55)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, min: 1)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, pattern: "^[\\w-]+_[0-9a-zA-Z]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case clientId = "ClientId"
            case enforcement = "Enforcement"
            case links = "Links"
            case termsName = "TermsName"
            case termsSource = "TermsSource"
            case userPoolId = "UserPoolId"
        }
    }

    public struct CreateTermsResponse: AWSDecodableShape {
        /// A summary of your terms documents. Includes a unique identifier for later changes to the terms documents.
        public let terms: TermsType?

        @inlinable
        public init(terms: TermsType? = nil) {
            self.terms = terms
        }

        private enum CodingKeys: String, CodingKey {
            case terms = "Terms"
        }
    }

    public struct CreateUserImportJobRequest: AWSEncodableShape {
        /// You must specify an IAM role that has permission to log import-job results to Amazon CloudWatch Logs. This parameter is the ARN of that role.
        public let cloudWatchLogsRoleArn: String
        /// A friendly name for the user import job.
        public let jobName: String
        /// The ID of the user pool that you want to import users into.
        public let userPoolId: String

        @inlinable
        public init(cloudWatchLogsRoleArn: String, jobName: String, userPoolId: String) {
            self.cloudWatchLogsRoleArn = cloudWatchLogsRoleArn
            self.jobName = jobName
            self.userPoolId = userPoolId
        }

        public func validate(name: String) throws {
            try self.validate(self.cloudWatchLogsRoleArn, name: "cloudWatchLogsRoleArn", parent: name, max: 2048)
            try self.validate(self.cloudWatchLogsRoleArn, name: "cloudWatchLogsRoleArn", parent: name, min: 20)
            try self.validate(self.cloudWatchLogsRoleArn, name: "cloudWatchLogsRoleArn", parent: name, pattern: "^arn:[\\w+=/,.@-]+:[\\w+=/,.@-]+:([\\w+=/,.@-]*)?:[0-9]+:[\\w+=/,.@-]+(:[\\w+=/,.@-]+)?(:[\\w+=/,.@-]+)?$")
            try self.validate(self.jobName, name: "jobName", parent: name, max: 128)
            try self.validate(self.jobName, name: "jobName", parent: name, min: 1)
            try self.validate(self.jobName, name: "jobName", parent: name, pattern: "^[\\w\\s+=,.@-]+$")
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, max: 55)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, min: 1)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, pattern: "^[\\w-]+_[0-9a-zA-Z]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case cloudWatchLogsRoleArn = "CloudWatchLogsRoleArn"
            case jobName = "JobName"
            case userPoolId = "UserPoolId"
        }
    }

    public struct CreateUserImportJobResponse: AWSDecodableShape {
        /// The details of the user import job. Includes logging destination, status, and the Amazon S3 pre-signed URL for CSV upload.
        public let userImportJob: UserImportJobType?

        @inlinable
        public init(userImportJob: UserImportJobType? = nil) {
            self.userImportJob = userImportJob
        }

        private enum CodingKeys: String, CodingKey {
            case userImportJob = "UserImportJob"
        }
    }

    public struct CreateUserPoolClientRequest: AWSEncodableShape {
        /// The access token time limit. After this limit expires, your user can't use
        /// their access token. To specify the time unit for AccessTokenValidity as
        /// seconds, minutes, hours, or days,
        /// set a TokenValidityUnits value in your API request. For example, when you set AccessTokenValidity to 10 and
        /// TokenValidityUnits to hours, your user can authorize access with
        /// their access token for 10 hours. The default time unit for AccessTokenValidity in an API request is hours.
        /// Valid range is displayed below in seconds. If you don't specify otherwise in the configuration of your app client, your access
        /// tokens are valid for one hour.
        public let accessTokenValidity: Int?
        /// The OAuth grant types that you want your app client to generate for clients in managed login authentication. To create an app client that generates client credentials grants, you must add client_credentials as the only allowed OAuth flow.  code  Use a code grant flow, which provides an authorization code as the response. This code can be exchanged for access tokens with the /oauth2/token endpoint.  implicit  Issue the access token, and the ID token when scopes like openid and profile are requested, directly to your user.  client_credentials  Issue the access token from the /oauth2/token endpoint directly to a non-person user, authorized by a combination of the client ID and client secret.
        public let allowedOAuthFlows: [OAuthFlowType]?
        /// Set to true to use OAuth 2.0 authorization server features in your app client. This parameter must have a value of true before you can configure
        /// the following features in your app client.    CallBackURLs: Callback URLs.    LogoutURLs: Sign-out redirect URLs.    AllowedOAuthScopes: OAuth 2.0 scopes.    AllowedOAuthFlows: Support for authorization code, implicit, and client credentials OAuth 2.0 grants.   To use authorization server features, configure one of these features in the Amazon Cognito console or set
        /// AllowedOAuthFlowsUserPoolClient to true in a CreateUserPoolClient or
        /// UpdateUserPoolClient API request. If you don't set a value for
        /// AllowedOAuthFlowsUserPoolClient in a request with the CLI or SDKs, it defaults
        /// to false. When false, only SDK-based API sign-in is permitted.
        public let allowedOAuthFlowsUserPoolClient: Bool?
        /// The OAuth, OpenID Connect (OIDC), and custom scopes that you want to permit your app client to authorize access with. Scopes govern access control to user pool self-service API operations, user data from the userInfo endpoint, and third-party APIs. Scope values include phone, email, openid, and profile. The aws.cognito.signin.user.admin scope authorizes user self-service operations. Custom scopes with resource servers authorize access to external APIs.
        public let allowedOAuthScopes: [String]?
        /// The user pool analytics configuration for collecting metrics and sending them to your Amazon Pinpoint campaign. In Amazon Web Services Regions where Amazon Pinpoint isn't available, user pools might not have access to analytics or might be configurable with campaigns in the US East (N. Virginia) Region. For more information, see Using Amazon Pinpoint analytics.
        public let analyticsConfiguration: AnalyticsConfigurationType?
        /// Amazon Cognito creates a session token for each API request in an authentication flow. AuthSessionValidity is the duration,
        /// in minutes, of that session token. Your user pool native user must respond to each authentication challenge before the session expires.
        public let authSessionValidity: Int?
        /// A list of allowed redirect, or callback, URLs for managed login authentication. These URLs are the paths where you want to send your users' browsers after they complete authentication with managed login or a third-party IdP. Typically, callback URLs are the home of an application that uses OAuth or OIDC libraries to process authentication outcomes. A redirect URI must meet the following requirements:   Be an absolute URI.   Be registered with the authorization server. Amazon Cognito doesn't accept authorization requests with redirect_uri values that aren't in the list of CallbackURLs that you provide in this parameter.   Not include a fragment component.   See OAuth 2.0 - Redirection Endpoint. Amazon Cognito requires HTTPS over HTTP except for http://localhost for testing purposes only. App callback URLs such as myapp://example are also supported.
        public let callbackURLs: [String]?
        /// A friendly name for the app client that you want to create.
        public let clientName: String
        /// The default redirect URI. In app clients with one assigned IdP, replaces redirect_uri in authentication requests. Must be in the CallbackURLs list.
        public let defaultRedirectURI: String?
        /// When true, your application can include additional UserContextData in authentication requests. This data includes the IP address, and contributes to analysis by threat protection features. For more information about propagation of user context data, see Adding session data to API requests. If you don’t include this parameter, you can't send the source IP address to Amazon Cognito threat protection features. You can only activate EnablePropagateAdditionalUserContextData in an app client that has a client secret.
        public let enablePropagateAdditionalUserContextData: Bool?
        /// Activates or deactivates token revocation in the target app client. If you don't include this parameter, token revocation is automatically activated for the new user pool client.
        public let enableTokenRevocation: Bool?
        /// The authentication flows that you want your user pool client to support. For each app
        /// client in your user pool, you can sign in your users with any combination of one or more flows, including with
        /// a user name and Secure Remote Password (SRP), a user name and password, or a custom authentication process that
        /// you define with Lambda functions.  If you don't specify a value for ExplicitAuthFlows, your app client supports
        /// ALLOW_REFRESH_TOKEN_AUTH, ALLOW_USER_SRP_AUTH, and ALLOW_CUSTOM_AUTH.
        ///   The values for authentication flow options include the following.    ALLOW_USER_AUTH: Enable selection-based sign-in with USER_AUTH. This setting covers username-password, secure remote password (SRP), passwordless, and passkey authentication. This authentiation flow can do username-password and SRP authentication without other ExplicitAuthFlows permitting them. For example users can complete an SRP challenge through USER_AUTH  without the flow USER_SRP_AUTH being active for the app client. This flow doesn't include CUSTOM_AUTH.  To activate this setting, your user pool must be in the  Essentials tier or higher.    ALLOW_ADMIN_USER_PASSWORD_AUTH: Enable admin based user password authentication flow ADMIN_USER_PASSWORD_AUTH. This setting replaces the ADMIN_NO_SRP_AUTH setting. With this authentication flow, your app passes a user name and password to Amazon Cognito in the request, instead of using the Secure  Remote Password (SRP) protocol to securely transmit the password.    ALLOW_CUSTOM_AUTH: Enable Lambda trigger based authentication.    ALLOW_USER_PASSWORD_AUTH: Enable user password-based authentication. In this flow, Amazon Cognito receives the password in the request instead of using the SRP protocol to verify passwords.    ALLOW_USER_SRP_AUTH: Enable SRP-based authentication.    ALLOW_REFRESH_TOKEN_AUTH: Enable authflow to refresh tokens.   In some environments, you will see the values ADMIN_NO_SRP_AUTH, CUSTOM_AUTH_FLOW_ONLY, or USER_PASSWORD_AUTH.
        /// You can't assign these legacy ExplicitAuthFlows values to user pool clients at the same time as values that begin with ALLOW_,
        /// like ALLOW_USER_SRP_AUTH.
        public let explicitAuthFlows: [ExplicitAuthFlowsType]?
        /// When true, generates a client secret for the app client. Client secrets are used with server-side and machine-to-machine applications. Client secrets are automatically generated; you can't specify a secret value. For more information, see App client types.
        public let generateSecret: Bool?
        /// The ID token time limit. After this limit expires, your user can't use
        /// their ID token. To specify the time unit for IdTokenValidity as
        /// seconds, minutes, hours, or days,
        /// set a TokenValidityUnits value in your API request. For example, when you set IdTokenValidity as 10 and
        /// TokenValidityUnits as hours, your user can authenticate their
        /// session with their ID token for 10 hours. The default time unit for IdTokenValidity in an API request is hours.
        /// Valid range is displayed below in seconds. If you don't specify otherwise in the configuration of your app client, your ID
        /// tokens are valid for one hour.
        public let idTokenValidity: Int?
        /// A list of allowed logout URLs for managed login authentication. When you pass logout_uri and client_id parameters to /logout, Amazon Cognito signs out your user and redirects them to the logout URL. This parameter describes the URLs that you want to be the permitted targets of logout_uri. A typical use of these URLs is when a user selects "Sign out" and you redirect them to your public homepage. For more information, see Logout endpoint.
        public let logoutURLs: [String]?
        /// When ENABLED, suppresses messages that might indicate a valid user exists  when someone attempts sign-in. This parameters sets your preference for the errors and  responses that you want Amazon Cognito APIs to return during authentication, account confirmation, and password recovery when the user doesn't exist in the user pool. When set to ENABLED and the user doesn't exist, authentication returns an error indicating either the username or password was incorrect. Account confirmation and password recovery return a response indicating a code was sent to a simulated destination. When set to LEGACY, those APIs return a UserNotFoundException exception if the user doesn't exist in the user pool. Defaults to LEGACY.
        public let preventUserExistenceErrors: PreventUserExistenceErrorTypes?
        /// The list of user attributes that you want your app client to have read access to. After your user authenticates in your app, their access token authorizes them to read their own attribute value for any attribute in this list. When you don't specify the ReadAttributes for your app client, your app can read the values of email_verified, phone_number_verified, and the standard attributes of your user pool. When your user pool app client has read access to these default attributes, ReadAttributes doesn't return any information. Amazon Cognito only populates ReadAttributes in the API response if you have specified your own custom set of read attributes.
        public let readAttributes: [String]?
        /// The configuration of your app client for refresh token rotation. When enabled, your app client issues new ID, access, and refresh tokens when users renew their sessions with refresh tokens. When disabled, token refresh issues only ID and access tokens.
        public let refreshTokenRotation: RefreshTokenRotationType?
        /// The refresh token time limit. After this limit expires, your user can't use
        /// their refresh token. To specify the time unit for RefreshTokenValidity as
        /// seconds, minutes, hours, or days,
        /// set a TokenValidityUnits value in your API request. For example, when you set RefreshTokenValidity as 10 and
        /// TokenValidityUnits as days, your user can refresh their session
        /// and retrieve new access and ID tokens for 10 days. The default time unit for RefreshTokenValidity in an API request is days.
        /// You can't set RefreshTokenValidity to 0. If you do, Amazon Cognito overrides the
        /// value with the default value of 30 days. Valid range is displayed below
        /// in seconds. If you don't specify otherwise in the configuration of your app client, your refresh
        /// tokens are valid for 30 days.
        public let refreshTokenValidity: Int?
        /// A list of provider names for the identity providers (IdPs) that are supported on this client. The following are supported: COGNITO, Facebook, Google, SignInWithApple, and LoginWithAmazon. You can also specify the names that you configured for the SAML and OIDC IdPs in your user pool, for example MySAMLIdP or MyOIDCIdP. This parameter sets the IdPs that managed  login will display on the login page for your app client. The removal of  COGNITO from this list doesn't prevent authentication operations  for local users with the user pools API in an Amazon Web Services SDK. The only way to prevent  SDK-based authentication is to block access with a WAF rule.
        public let supportedIdentityProviders: [String]?
        /// The units that validity times are represented in. The default unit for refresh tokens is days, and the default for ID and access tokens are hours.
        public let tokenValidityUnits: TokenValidityUnitsType?
        /// The ID of the user pool where you want to create an app client.
        public let userPoolId: String
        /// The list of user attributes that you want your app client to have write access to. After your user authenticates in your app, their access token authorizes them to set or modify their own attribute value for any attribute in this list. When you don't specify the WriteAttributes for your app client, your app can write the values of the Standard attributes of your user pool. When your user pool has write access to these default attributes, WriteAttributes doesn't return any information. Amazon Cognito only populates WriteAttributes in the API response if you have specified your own custom set of write attributes. If your app client allows users to sign in through an IdP, this array must include all attributes that you have mapped to IdP attributes. Amazon Cognito updates mapped attributes when users sign in to your application through an IdP. If your app client does not have write access to a mapped attribute, Amazon Cognito throws an error when it tries to update the attribute. For more information, see Specifying IdP Attribute Mappings for Your user pool.
        public let writeAttributes: [String]?

        @inlinable
        public init(accessTokenValidity: Int? = nil, allowedOAuthFlows: [OAuthFlowType]? = nil, allowedOAuthFlowsUserPoolClient: Bool? = nil, allowedOAuthScopes: [String]? = nil, analyticsConfiguration: AnalyticsConfigurationType? = nil, authSessionValidity: Int? = nil, callbackURLs: [String]? = nil, clientName: String, defaultRedirectURI: String? = nil, enablePropagateAdditionalUserContextData: Bool? = nil, enableTokenRevocation: Bool? = nil, explicitAuthFlows: [ExplicitAuthFlowsType]? = nil, generateSecret: Bool? = nil, idTokenValidity: Int? = nil, logoutURLs: [String]? = nil, preventUserExistenceErrors: PreventUserExistenceErrorTypes? = nil, readAttributes: [String]? = nil, refreshTokenRotation: RefreshTokenRotationType? = nil, refreshTokenValidity: Int? = nil, supportedIdentityProviders: [String]? = nil, tokenValidityUnits: TokenValidityUnitsType? = nil, userPoolId: String, writeAttributes: [String]? = nil) {
            self.accessTokenValidity = accessTokenValidity
            self.allowedOAuthFlows = allowedOAuthFlows
            self.allowedOAuthFlowsUserPoolClient = allowedOAuthFlowsUserPoolClient
            self.allowedOAuthScopes = allowedOAuthScopes
            self.analyticsConfiguration = analyticsConfiguration
            self.authSessionValidity = authSessionValidity
            self.callbackURLs = callbackURLs
            self.clientName = clientName
            self.defaultRedirectURI = defaultRedirectURI
            self.enablePropagateAdditionalUserContextData = enablePropagateAdditionalUserContextData
            self.enableTokenRevocation = enableTokenRevocation
            self.explicitAuthFlows = explicitAuthFlows
            self.generateSecret = generateSecret
            self.idTokenValidity = idTokenValidity
            self.logoutURLs = logoutURLs
            self.preventUserExistenceErrors = preventUserExistenceErrors
            self.readAttributes = readAttributes
            self.refreshTokenRotation = refreshTokenRotation
            self.refreshTokenValidity = refreshTokenValidity
            self.supportedIdentityProviders = supportedIdentityProviders
            self.tokenValidityUnits = tokenValidityUnits
            self.userPoolId = userPoolId
            self.writeAttributes = writeAttributes
        }

        public func validate(name: String) throws {
            try self.validate(self.accessTokenValidity, name: "accessTokenValidity", parent: name, max: 86400)
            try self.validate(self.accessTokenValidity, name: "accessTokenValidity", parent: name, min: 1)
            try self.validate(self.allowedOAuthFlows, name: "allowedOAuthFlows", parent: name, max: 3)
            try self.allowedOAuthScopes?.forEach {
                try validate($0, name: "allowedOAuthScopes[]", parent: name, max: 256)
                try validate($0, name: "allowedOAuthScopes[]", parent: name, min: 1)
                try validate($0, name: "allowedOAuthScopes[]", parent: name, pattern: "^[\\x21\\x23-\\x5B\\x5D-\\x7E]+$")
            }
            try self.validate(self.allowedOAuthScopes, name: "allowedOAuthScopes", parent: name, max: 50)
            try self.analyticsConfiguration?.validate(name: "\(name).analyticsConfiguration")
            try self.validate(self.authSessionValidity, name: "authSessionValidity", parent: name, max: 15)
            try self.validate(self.authSessionValidity, name: "authSessionValidity", parent: name, min: 3)
            try self.callbackURLs?.forEach {
                try validate($0, name: "callbackURLs[]", parent: name, max: 1024)
                try validate($0, name: "callbackURLs[]", parent: name, min: 1)
                try validate($0, name: "callbackURLs[]", parent: name, pattern: "^[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}]+$")
            }
            try self.validate(self.callbackURLs, name: "callbackURLs", parent: name, max: 100)
            try self.validate(self.clientName, name: "clientName", parent: name, max: 128)
            try self.validate(self.clientName, name: "clientName", parent: name, min: 1)
            try self.validate(self.clientName, name: "clientName", parent: name, pattern: "^[\\w\\s+=,.@-]+$")
            try self.validate(self.defaultRedirectURI, name: "defaultRedirectURI", parent: name, max: 1024)
            try self.validate(self.defaultRedirectURI, name: "defaultRedirectURI", parent: name, min: 1)
            try self.validate(self.defaultRedirectURI, name: "defaultRedirectURI", parent: name, pattern: "^[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}]+$")
            try self.validate(self.idTokenValidity, name: "idTokenValidity", parent: name, max: 86400)
            try self.validate(self.idTokenValidity, name: "idTokenValidity", parent: name, min: 1)
            try self.logoutURLs?.forEach {
                try validate($0, name: "logoutURLs[]", parent: name, max: 1024)
                try validate($0, name: "logoutURLs[]", parent: name, min: 1)
                try validate($0, name: "logoutURLs[]", parent: name, pattern: "^[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}]+$")
            }
            try self.validate(self.logoutURLs, name: "logoutURLs", parent: name, max: 100)
            try self.readAttributes?.forEach {
                try validate($0, name: "readAttributes[]", parent: name, max: 2048)
                try validate($0, name: "readAttributes[]", parent: name, min: 1)
            }
            try self.refreshTokenRotation?.validate(name: "\(name).refreshTokenRotation")
            try self.validate(self.refreshTokenValidity, name: "refreshTokenValidity", parent: name, max: 315360000)
            try self.validate(self.refreshTokenValidity, name: "refreshTokenValidity", parent: name, min: 0)
            try self.supportedIdentityProviders?.forEach {
                try validate($0, name: "supportedIdentityProviders[]", parent: name, max: 32)
                try validate($0, name: "supportedIdentityProviders[]", parent: name, min: 1)
                try validate($0, name: "supportedIdentityProviders[]", parent: name, pattern: "^[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}\\p{Z}]+$")
            }
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, max: 55)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, min: 1)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, pattern: "^[\\w-]+_[0-9a-zA-Z]+$")
            try self.writeAttributes?.forEach {
                try validate($0, name: "writeAttributes[]", parent: name, max: 2048)
                try validate($0, name: "writeAttributes[]", parent: name, min: 1)
            }
        }

        private enum CodingKeys: String, CodingKey {
            case accessTokenValidity = "AccessTokenValidity"
            case allowedOAuthFlows = "AllowedOAuthFlows"
            case allowedOAuthFlowsUserPoolClient = "AllowedOAuthFlowsUserPoolClient"
            case allowedOAuthScopes = "AllowedOAuthScopes"
            case analyticsConfiguration = "AnalyticsConfiguration"
            case authSessionValidity = "AuthSessionValidity"
            case callbackURLs = "CallbackURLs"
            case clientName = "ClientName"
            case defaultRedirectURI = "DefaultRedirectURI"
            case enablePropagateAdditionalUserContextData = "EnablePropagateAdditionalUserContextData"
            case enableTokenRevocation = "EnableTokenRevocation"
            case explicitAuthFlows = "ExplicitAuthFlows"
            case generateSecret = "GenerateSecret"
            case idTokenValidity = "IdTokenValidity"
            case logoutURLs = "LogoutURLs"
            case preventUserExistenceErrors = "PreventUserExistenceErrors"
            case readAttributes = "ReadAttributes"
            case refreshTokenRotation = "RefreshTokenRotation"
            case refreshTokenValidity = "RefreshTokenValidity"
            case supportedIdentityProviders = "SupportedIdentityProviders"
            case tokenValidityUnits = "TokenValidityUnits"
            case userPoolId = "UserPoolId"
            case writeAttributes = "WriteAttributes"
        }
    }

    public struct CreateUserPoolClientResponse: AWSDecodableShape {
        /// The details of the new app client.
        public let userPoolClient: UserPoolClientType?

        @inlinable
        public init(userPoolClient: UserPoolClientType? = nil) {
            self.userPoolClient = userPoolClient
        }

        private enum CodingKeys: String, CodingKey {
            case userPoolClient = "UserPoolClient"
        }
    }

    public struct CreateUserPoolDomainRequest: AWSEncodableShape {
        /// The configuration for a custom domain. Configures your domain with an Certificate Manager certificate in the us-east-1 Region. Provide this parameter only if you want to use a custom domain for your user pool. Otherwise, you can omit this parameter and use a prefix domain instead. When you create a custom domain, the passkey RP ID defaults to the custom domain. If you had a prefix domain active, this will cause passkey integration for your prefix domain to stop working due to a mismatch in RP ID. To keep the prefix domain passkey integration working, you can explicitly set RP ID to the prefix domain.
        public let customDomainConfig: CustomDomainConfigType?
        /// The domain string. For custom domains, this is the fully-qualified domain name, such as auth.example.com. For prefix domains, this is the prefix alone, such as myprefix. A prefix value of myprefix for a user pool in the us-east-1 Region results in a domain of myprefix.auth.us-east-1.amazoncognito.com.
        public let domain: String
        /// The version of managed login branding that you want to apply to your domain. A value of 1 indicates hosted UI (classic) and a version of 2 indicates managed login. Managed login requires that your user pool be configured for any feature plan other than Lite.
        public let managedLoginVersion: Int?
        /// The ID of the user pool where you want to add a domain.
        public let userPoolId: String

        @inlinable
        public init(customDomainConfig: CustomDomainConfigType? = nil, domain: String, managedLoginVersion: Int? = nil, userPoolId: String) {
            self.customDomainConfig = customDomainConfig
            self.domain = domain
            self.managedLoginVersion = managedLoginVersion
            self.userPoolId = userPoolId
        }

        public func validate(name: String) throws {
            try self.customDomainConfig?.validate(name: "\(name).customDomainConfig")
            try self.validate(self.domain, name: "domain", parent: name, max: 63)
            try self.validate(self.domain, name: "domain", parent: name, min: 1)
            try self.validate(self.domain, name: "domain", parent: name, pattern: "^[a-z0-9](?:[a-z0-9\\-]{0,61}[a-z0-9])?$")
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, max: 55)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, min: 1)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, pattern: "^[\\w-]+_[0-9a-zA-Z]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case customDomainConfig = "CustomDomainConfig"
            case domain = "Domain"
            case managedLoginVersion = "ManagedLoginVersion"
            case userPoolId = "UserPoolId"
        }
    }

    public struct CreateUserPoolDomainResponse: AWSDecodableShape {
        /// The fully-qualified domain name (FQDN) of the Amazon CloudFront distribution that hosts your managed login or classic hosted UI pages. Your domain-name authority must have an alias record that points requests for your custom domain to this FQDN. Amazon Cognito returns this value if you set a custom domain with CustomDomainConfig. If you set an Amazon Cognito prefix domain, this parameter returns null.
        public let cloudFrontDomain: String?
        /// The version of managed login branding applied your domain. A value of 1 indicates hosted UI (classic) and a version of 2 indicates managed login.
        public let managedLoginVersion: Int?

        @inlinable
        public init(cloudFrontDomain: String? = nil, managedLoginVersion: Int? = nil) {
            self.cloudFrontDomain = cloudFrontDomain
            self.managedLoginVersion = managedLoginVersion
        }

        private enum CodingKeys: String, CodingKey {
            case cloudFrontDomain = "CloudFrontDomain"
            case managedLoginVersion = "ManagedLoginVersion"
        }
    }

    public struct CreateUserPoolRequest: AWSEncodableShape {
        /// The available verified method a user can use to recover their password when they call ForgotPassword. You can use this setting to define a preferred method when a user has more than one method available. With this setting, SMS doesn't qualify for a valid password recovery mechanism if the user also has SMS multi-factor authentication (MFA) activated. Email MFA is also disqualifying for account recovery with email. In the absence of this setting, Amazon Cognito uses the legacy behavior to determine the recovery method where SMS is preferred over email. As a best practice, configure both verified_email and verified_phone_number, with one having a higher priority than the other.
        public let accountRecoverySetting: AccountRecoverySettingType?
        /// The configuration for administrative creation of users. Includes the template for the invitation message for new users, the duration of temporary passwords, and permitting self-service sign-up.
        public let adminCreateUserConfig: AdminCreateUserConfigType?
        /// Attributes supported as an alias for this user pool. For more information about alias attributes, see Customizing sign-in attributes.
        public let aliasAttributes: [AliasAttributeType]?
        /// The attributes that you want your user pool to automatically verify. For more information, see Verifying contact information at sign-up.
        public let autoVerifiedAttributes: [VerifiedAttributeType]?
        /// When active, DeletionProtection prevents accidental deletion of your user
        /// pool. Before you can delete a user pool that you have protected against deletion, you
        /// must deactivate this feature. When you try to delete a protected user pool in a DeleteUserPool API request,
        /// Amazon Cognito returns an InvalidParameterException error. To delete a protected user pool,
        /// send a new DeleteUserPool request after you deactivate deletion protection in an
        /// UpdateUserPool API request.
        public let deletionProtection: DeletionProtectionType?
        /// The device-remembering configuration for a user pool. Device remembering or device tracking is a "Remember me on this device" option for user pools that perform authentication with the device key of a trusted device in the back end, instead of a user-provided MFA code. For more information about device authentication, see Working with user devices in your user pool. A null value indicates that you have deactivated device remembering in your user pool.  When you provide a value for any DeviceConfiguration field, you activate the Amazon Cognito device-remembering feature. For more information, see Working with devices.
        public let deviceConfiguration: DeviceConfigurationType?
        /// The email configuration of your user pool. The email configuration type sets your preferred sending method, Amazon Web Services Region, and sender for messages from your user pool.
        public let emailConfiguration: EmailConfigurationType?
        /// This parameter is no longer used.
        public let emailVerificationMessage: String?
        /// This parameter is no longer used.
        public let emailVerificationSubject: String?
        /// A collection of user pool Lambda triggers. Amazon Cognito invokes triggers at several possible stages of authentication operations. Triggers can modify the outcome of the operations that invoked them.
        public let lambdaConfig: LambdaConfigType?
        /// Sets multi-factor authentication (MFA) to be on, off, or optional. When ON, all users must set up MFA before they can sign in. When OPTIONAL, your application must make a client-side determination of whether a user wants to register an MFA device. For user pools with adaptive authentication with threat protection, choose OPTIONAL. When MfaConfiguration is OPTIONAL, managed login doesn't automatically prompt users to set up MFA. Amazon Cognito generates MFA prompts in API responses and in managed login for users who have chosen and configured a preferred MFA factor.
        public let mfaConfiguration: UserPoolMfaType?
        /// The password policy and sign-in policy in the user pool. The password policy sets options like password complexity requirements and password history. The sign-in policy sets the options available to applications in choice-based authentication.
        public let policies: UserPoolPolicyType?
        /// A friendly name for your user pool.
        public let poolName: String
        /// An array of attributes for the new user pool. You can add custom attributes and modify the properties of default attributes. The specifications in this parameter set the required attributes in your user pool. For more information, see Working with user attributes.
        public let schema: [SchemaAttributeType]?
        /// The contents of the SMS message that your user pool sends to users in SMS OTP and MFA authentication.
        public let smsAuthenticationMessage: String?
        /// The settings for your Amazon Cognito user pool to send SMS messages with Amazon Simple Notification Service. To send SMS messages with Amazon SNS in the Amazon Web Services Region that you want, the Amazon Cognito user pool uses an Identity and Access Management (IAM) role in your Amazon Web Services account. For more information see SMS message settings.
        public let smsConfiguration: SmsConfigurationType?
        /// This parameter is no longer used.
        public let smsVerificationMessage: String?
        /// The settings for updates to user attributes. These settings include the property AttributesRequireVerificationBeforeUpdate,
        /// a user-pool setting that tells Amazon Cognito how to handle changes to the value of your users' email address and phone number attributes. For
        /// more information, see
        /// Verifying updates to email addresses and phone numbers.
        public let userAttributeUpdateSettings: UserAttributeUpdateSettingsType?
        /// Specifies whether a user can use an email address or phone number as a username when they sign up. For more information, see Customizing sign-in attributes.
        public let usernameAttributes: [UsernameAttributeType]?
        /// Sets the case sensitivity option for sign-in usernames. When CaseSensitive is false (case insensitive), users can sign in with any combination of capital and lowercase letters. For example, username, USERNAME, or UserName, or for email, email@example.com or EMaiL@eXamplE.Com. For most use cases, set case sensitivity to false as a best practice. When usernames and email addresses are case insensitive, Amazon Cognito treats any variation in case as the same user, and prevents a case variation from being assigned to the same attribute for a different user. When CaseSensitive is true (case sensitive), Amazon Cognito interprets USERNAME and UserName as distinct users. This configuration is immutable after you set it.
        public let usernameConfiguration: UsernameConfigurationType?
        /// Contains settings for activation of threat protection, including the operating
        /// mode and additional authentication types. To log user security information but take
        /// no action, set to AUDIT. To configure automatic security responses to
        /// potentially unwanted traffic to your user pool, set to ENFORCED. For more information, see Adding advanced security to a user pool. To activate this setting, your user pool must be on the  Plus tier.
        public let userPoolAddOns: UserPoolAddOnsType?
        /// The tag keys and values to assign to the user pool. A tag is a label that you can use to categorize and manage user pools in different ways, such as by purpose, owner, environment, or other criteria.
        public let userPoolTags: [String: String]?
        /// The user pool feature plan, or tier. This parameter determines the eligibility of the user pool for features like managed login, access-token customization, and threat protection. Defaults to ESSENTIALS.
        public let userPoolTier: UserPoolTierType?
        /// The template for the verification message that your user pool delivers to users who set an email address or phone number attribute. Set the email message type that corresponds to your DefaultEmailOption selection. For CONFIRM_WITH_LINK, specify an EmailMessageByLink and leave EmailMessage blank. For CONFIRM_WITH_CODE, specify an EmailMessage and leave EmailMessageByLink blank. When you supply both parameters with either choice, Amazon Cognito returns an error.
        public let verificationMessageTemplate: VerificationMessageTemplateType?

        @inlinable
        public init(accountRecoverySetting: AccountRecoverySettingType? = nil, adminCreateUserConfig: AdminCreateUserConfigType? = nil, aliasAttributes: [AliasAttributeType]? = nil, autoVerifiedAttributes: [VerifiedAttributeType]? = nil, deletionProtection: DeletionProtectionType? = nil, deviceConfiguration: DeviceConfigurationType? = nil, emailConfiguration: EmailConfigurationType? = nil, emailVerificationMessage: String? = nil, emailVerificationSubject: String? = nil, lambdaConfig: LambdaConfigType? = nil, mfaConfiguration: UserPoolMfaType? = nil, policies: UserPoolPolicyType? = nil, poolName: String, schema: [SchemaAttributeType]? = nil, smsAuthenticationMessage: String? = nil, smsConfiguration: SmsConfigurationType? = nil, smsVerificationMessage: String? = nil, userAttributeUpdateSettings: UserAttributeUpdateSettingsType? = nil, usernameAttributes: [UsernameAttributeType]? = nil, usernameConfiguration: UsernameConfigurationType? = nil, userPoolAddOns: UserPoolAddOnsType? = nil, userPoolTags: [String: String]? = nil, userPoolTier: UserPoolTierType? = nil, verificationMessageTemplate: VerificationMessageTemplateType? = nil) {
            self.accountRecoverySetting = accountRecoverySetting
            self.adminCreateUserConfig = adminCreateUserConfig
            self.aliasAttributes = aliasAttributes
            self.autoVerifiedAttributes = autoVerifiedAttributes
            self.deletionProtection = deletionProtection
            self.deviceConfiguration = deviceConfiguration
            self.emailConfiguration = emailConfiguration
            self.emailVerificationMessage = emailVerificationMessage
            self.emailVerificationSubject = emailVerificationSubject
            self.lambdaConfig = lambdaConfig
            self.mfaConfiguration = mfaConfiguration
            self.policies = policies
            self.poolName = poolName
            self.schema = schema
            self.smsAuthenticationMessage = smsAuthenticationMessage
            self.smsConfiguration = smsConfiguration
            self.smsVerificationMessage = smsVerificationMessage
            self.userAttributeUpdateSettings = userAttributeUpdateSettings
            self.usernameAttributes = usernameAttributes
            self.usernameConfiguration = usernameConfiguration
            self.userPoolAddOns = userPoolAddOns
            self.userPoolTags = userPoolTags
            self.userPoolTier = userPoolTier
            self.verificationMessageTemplate = verificationMessageTemplate
        }

        public func validate(name: String) throws {
            try self.accountRecoverySetting?.validate(name: "\(name).accountRecoverySetting")
            try self.adminCreateUserConfig?.validate(name: "\(name).adminCreateUserConfig")
            try self.emailConfiguration?.validate(name: "\(name).emailConfiguration")
            try self.validate(self.emailVerificationMessage, name: "emailVerificationMessage", parent: name, max: 20000)
            try self.validate(self.emailVerificationMessage, name: "emailVerificationMessage", parent: name, min: 6)
            try self.validate(self.emailVerificationMessage, name: "emailVerificationMessage", parent: name, pattern: "^[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}\\s*]*\\{####\\}[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}\\s*]*$")
            try self.validate(self.emailVerificationSubject, name: "emailVerificationSubject", parent: name, max: 140)
            try self.validate(self.emailVerificationSubject, name: "emailVerificationSubject", parent: name, min: 1)
            try self.validate(self.emailVerificationSubject, name: "emailVerificationSubject", parent: name, pattern: "^[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}\\s]+$")
            try self.lambdaConfig?.validate(name: "\(name).lambdaConfig")
            try self.policies?.validate(name: "\(name).policies")
            try self.validate(self.poolName, name: "poolName", parent: name, max: 128)
            try self.validate(self.poolName, name: "poolName", parent: name, min: 1)
            try self.validate(self.poolName, name: "poolName", parent: name, pattern: "^[\\w\\s+=,.@-]+$")
            try self.schema?.forEach {
                try $0.validate(name: "\(name).schema[]")
            }
            try self.validate(self.schema, name: "schema", parent: name, max: 50)
            try self.validate(self.schema, name: "schema", parent: name, min: 1)
            try self.validate(self.smsAuthenticationMessage, name: "smsAuthenticationMessage", parent: name, max: 140)
            try self.validate(self.smsAuthenticationMessage, name: "smsAuthenticationMessage", parent: name, min: 6)
            try self.validate(self.smsAuthenticationMessage, name: "smsAuthenticationMessage", parent: name, pattern: "\\{####\\}")
            try self.smsConfiguration?.validate(name: "\(name).smsConfiguration")
            try self.validate(self.smsVerificationMessage, name: "smsVerificationMessage", parent: name, max: 140)
            try self.validate(self.smsVerificationMessage, name: "smsVerificationMessage", parent: name, min: 6)
            try self.validate(self.smsVerificationMessage, name: "smsVerificationMessage", parent: name, pattern: "\\{####\\}")
            try self.userPoolTags?.forEach {
                try validate($0.key, name: "userPoolTags.key", parent: name, max: 128)
                try validate($0.key, name: "userPoolTags.key", parent: name, min: 1)
                try validate($0.value, name: "userPoolTags[\"\($0.key)\"]", parent: name, max: 256)
            }
            try self.verificationMessageTemplate?.validate(name: "\(name).verificationMessageTemplate")
        }

        private enum CodingKeys: String, CodingKey {
            case accountRecoverySetting = "AccountRecoverySetting"
            case adminCreateUserConfig = "AdminCreateUserConfig"
            case aliasAttributes = "AliasAttributes"
            case autoVerifiedAttributes = "AutoVerifiedAttributes"
            case deletionProtection = "DeletionProtection"
            case deviceConfiguration = "DeviceConfiguration"
            case emailConfiguration = "EmailConfiguration"
            case emailVerificationMessage = "EmailVerificationMessage"
            case emailVerificationSubject = "EmailVerificationSubject"
            case lambdaConfig = "LambdaConfig"
            case mfaConfiguration = "MfaConfiguration"
            case policies = "Policies"
            case poolName = "PoolName"
            case schema = "Schema"
            case smsAuthenticationMessage = "SmsAuthenticationMessage"
            case smsConfiguration = "SmsConfiguration"
            case smsVerificationMessage = "SmsVerificationMessage"
            case userAttributeUpdateSettings = "UserAttributeUpdateSettings"
            case usernameAttributes = "UsernameAttributes"
            case usernameConfiguration = "UsernameConfiguration"
            case userPoolAddOns = "UserPoolAddOns"
            case userPoolTags = "UserPoolTags"
            case userPoolTier = "UserPoolTier"
            case verificationMessageTemplate = "VerificationMessageTemplate"
        }
    }

    public struct CreateUserPoolResponse: AWSDecodableShape {
        /// The details of the created user pool.
        public let userPool: UserPoolType?

        @inlinable
        public init(userPool: UserPoolType? = nil) {
            self.userPool = userPool
        }

        private enum CodingKeys: String, CodingKey {
            case userPool = "UserPool"
        }
    }

    public struct CustomDomainConfigType: AWSEncodableShape & AWSDecodableShape {
        /// The Amazon Resource Name (ARN) of an Certificate Manager SSL certificate. You use this certificate for the subdomain of your custom domain.
        public let certificateArn: String

        @inlinable
        public init(certificateArn: String) {
            self.certificateArn = certificateArn
        }

        public func validate(name: String) throws {
            try self.validate(self.certificateArn, name: "certificateArn", parent: name, max: 2048)
            try self.validate(self.certificateArn, name: "certificateArn", parent: name, min: 20)
            try self.validate(self.certificateArn, name: "certificateArn", parent: name, pattern: "^arn:[\\w+=/,.@-]+:[\\w+=/,.@-]+:([\\w+=/,.@-]*)?:[0-9]+:[\\w+=/,.@-]+(:[\\w+=/,.@-]+)?(:[\\w+=/,.@-]+)?$")
        }

        private enum CodingKeys: String, CodingKey {
            case certificateArn = "CertificateArn"
        }
    }

    public struct CustomEmailLambdaVersionConfigType: AWSEncodableShape & AWSDecodableShape {
        /// The Amazon Resource Name (ARN) of the function that you want to assign to your Lambda trigger.
        public let lambdaArn: String
        /// The user pool trigger version of the request that Amazon Cognito sends to your Lambda function. Higher-numbered versions add fields that support new features. You must use a LambdaVersion of V1_0 with a custom sender function.
        public let lambdaVersion: CustomEmailSenderLambdaVersionType

        @inlinable
        public init(lambdaArn: String, lambdaVersion: CustomEmailSenderLambdaVersionType) {
            self.lambdaArn = lambdaArn
            self.lambdaVersion = lambdaVersion
        }

        public func validate(name: String) throws {
            try self.validate(self.lambdaArn, name: "lambdaArn", parent: name, max: 2048)
            try self.validate(self.lambdaArn, name: "lambdaArn", parent: name, min: 20)
            try self.validate(self.lambdaArn, name: "lambdaArn", parent: name, pattern: "^arn:[\\w+=/,.@-]+:[\\w+=/,.@-]+:([\\w+=/,.@-]*)?:[0-9]+:[\\w+=/,.@-]+(:[\\w+=/,.@-]+)?(:[\\w+=/,.@-]+)?$")
        }

        private enum CodingKeys: String, CodingKey {
            case lambdaArn = "LambdaArn"
            case lambdaVersion = "LambdaVersion"
        }
    }

    public struct CustomSMSLambdaVersionConfigType: AWSEncodableShape & AWSDecodableShape {
        /// The Amazon Resource Name (ARN) of the function that you want to assign to your Lambda trigger.
        public let lambdaArn: String
        /// The user pool trigger version of the request that Amazon Cognito sends to your Lambda function. Higher-numbered versions add fields that support new features. You must use a LambdaVersion of V1_0 with a custom sender function.
        public let lambdaVersion: CustomSMSSenderLambdaVersionType

        @inlinable
        public init(lambdaArn: String, lambdaVersion: CustomSMSSenderLambdaVersionType) {
            self.lambdaArn = lambdaArn
            self.lambdaVersion = lambdaVersion
        }

        public func validate(name: String) throws {
            try self.validate(self.lambdaArn, name: "lambdaArn", parent: name, max: 2048)
            try self.validate(self.lambdaArn, name: "lambdaArn", parent: name, min: 20)
            try self.validate(self.lambdaArn, name: "lambdaArn", parent: name, pattern: "^arn:[\\w+=/,.@-]+:[\\w+=/,.@-]+:([\\w+=/,.@-]*)?:[0-9]+:[\\w+=/,.@-]+(:[\\w+=/,.@-]+)?(:[\\w+=/,.@-]+)?$")
        }

        private enum CodingKeys: String, CodingKey {
            case lambdaArn = "LambdaArn"
            case lambdaVersion = "LambdaVersion"
        }
    }

    public struct DeleteGroupRequest: AWSEncodableShape {
        /// The name of the group that you want to delete.
        public let groupName: String
        /// The ID of the user pool where you want to delete the group.
        public let userPoolId: String

        @inlinable
        public init(groupName: String, userPoolId: String) {
            self.groupName = groupName
            self.userPoolId = userPoolId
        }

        public func validate(name: String) throws {
            try self.validate(self.groupName, name: "groupName", parent: name, max: 128)
            try self.validate(self.groupName, name: "groupName", parent: name, min: 1)
            try self.validate(self.groupName, name: "groupName", parent: name, pattern: "^[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}]+$")
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, max: 55)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, min: 1)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, pattern: "^[\\w-]+_[0-9a-zA-Z]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case groupName = "GroupName"
            case userPoolId = "UserPoolId"
        }
    }

    public struct DeleteIdentityProviderRequest: AWSEncodableShape {
        /// The name of the IdP that you want to delete.
        public let providerName: String
        /// The ID of the user pool where you want to delete the identity provider.
        public let userPoolId: String

        @inlinable
        public init(providerName: String, userPoolId: String) {
            self.providerName = providerName
            self.userPoolId = userPoolId
        }

        public func validate(name: String) throws {
            try self.validate(self.providerName, name: "providerName", parent: name, max: 32)
            try self.validate(self.providerName, name: "providerName", parent: name, min: 1)
            try self.validate(self.providerName, name: "providerName", parent: name, pattern: "^[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}\\p{Z}]+$")
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, max: 55)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, min: 1)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, pattern: "^[\\w-]+_[0-9a-zA-Z]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case providerName = "ProviderName"
            case userPoolId = "UserPoolId"
        }
    }

    public struct DeleteManagedLoginBrandingRequest: AWSEncodableShape {
        /// The ID of the managed login branding style that you want to delete.
        public let managedLoginBrandingId: String
        /// The ID of the user pool that contains the managed login branding style that you want to delete.
        public let userPoolId: String

        @inlinable
        public init(managedLoginBrandingId: String, userPoolId: String) {
            self.managedLoginBrandingId = managedLoginBrandingId
            self.userPoolId = userPoolId
        }

        public func validate(name: String) throws {
            try self.validate(self.managedLoginBrandingId, name: "managedLoginBrandingId", parent: name, pattern: "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[4][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$")
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, max: 55)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, min: 1)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, pattern: "^[\\w-]+_[0-9a-zA-Z]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case managedLoginBrandingId = "ManagedLoginBrandingId"
            case userPoolId = "UserPoolId"
        }
    }

    public struct DeleteResourceServerRequest: AWSEncodableShape {
        /// The identifier of the resource server that you want to delete.
        public let identifier: String
        /// The ID of the user pool where you want to delete the resource server.
        public let userPoolId: String

        @inlinable
        public init(identifier: String, userPoolId: String) {
            self.identifier = identifier
            self.userPoolId = userPoolId
        }

        public func validate(name: String) throws {
            try self.validate(self.identifier, name: "identifier", parent: name, max: 256)
            try self.validate(self.identifier, name: "identifier", parent: name, min: 1)
            try self.validate(self.identifier, name: "identifier", parent: name, pattern: "^[\\x21\\x23-\\x5B\\x5D-\\x7E]+$")
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, max: 55)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, min: 1)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, pattern: "^[\\w-]+_[0-9a-zA-Z]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case identifier = "Identifier"
            case userPoolId = "UserPoolId"
        }
    }

    public struct DeleteTermsRequest: AWSEncodableShape {
        /// The ID of the terms documents that you want to delete.
        public let termsId: String
        /// The ID of the user pool that contains the terms documents that you want to delete.
        public let userPoolId: String

        @inlinable
        public init(termsId: String, userPoolId: String) {
            self.termsId = termsId
            self.userPoolId = userPoolId
        }

        public func validate(name: String) throws {
            try self.validate(self.termsId, name: "termsId", parent: name, pattern: "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[4][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$")
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, max: 55)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, min: 1)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, pattern: "^[\\w-]+_[0-9a-zA-Z]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case termsId = "TermsId"
            case userPoolId = "UserPoolId"
        }
    }

    public struct DeleteUserAttributesRequest: AWSEncodableShape {
        /// A valid access token that Amazon Cognito issued to the currently signed-in user. Must include a scope claim for
        /// aws.cognito.signin.user.admin.
        public let accessToken: String
        /// An array of strings representing the user attribute names you want to delete. For custom attributes, you must prepend the custom: prefix to the attribute name, for example custom:department.
        public let userAttributeNames: [String]

        @inlinable
        public init(accessToken: String, userAttributeNames: [String]) {
            self.accessToken = accessToken
            self.userAttributeNames = userAttributeNames
        }

        public func validate(name: String) throws {
            try self.validate(self.accessToken, name: "accessToken", parent: name, pattern: "^[A-Za-z0-9-_=.]+$")
            try self.userAttributeNames.forEach {
                try validate($0, name: "userAttributeNames[]", parent: name, max: 32)
                try validate($0, name: "userAttributeNames[]", parent: name, min: 1)
                try validate($0, name: "userAttributeNames[]", parent: name, pattern: "^[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}]+$")
            }
        }

        private enum CodingKeys: String, CodingKey {
            case accessToken = "AccessToken"
            case userAttributeNames = "UserAttributeNames"
        }
    }

    public struct DeleteUserAttributesResponse: AWSDecodableShape {
        public init() {}
    }

    public struct DeleteUserPoolClientRequest: AWSEncodableShape {
        /// The ID of the user pool app client that you want to delete.
        public let clientId: String
        /// The ID of the user pool where you want to delete the client.
        public let userPoolId: String

        @inlinable
        public init(clientId: String, userPoolId: String) {
            self.clientId = clientId
            self.userPoolId = userPoolId
        }

        public func validate(name: String) throws {
            try self.validate(self.clientId, name: "clientId", parent: name, max: 128)
            try self.validate(self.clientId, name: "clientId", parent: name, min: 1)
            try self.validate(self.clientId, name: "clientId", parent: name, pattern: "^[\\w+]+$")
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, max: 55)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, min: 1)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, pattern: "^[\\w-]+_[0-9a-zA-Z]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case clientId = "ClientId"
            case userPoolId = "UserPoolId"
        }
    }

    public struct DeleteUserPoolDomainRequest: AWSEncodableShape {
        /// The domain that you want to delete. For custom domains, this is the fully-qualified domain name like auth.example.com. For Amazon Cognito prefix domains, this is the prefix alone, like myprefix.
        public let domain: String
        /// The ID of the user pool where you want to delete the domain.
        public let userPoolId: String

        @inlinable
        public init(domain: String, userPoolId: String) {
            self.domain = domain
            self.userPoolId = userPoolId
        }

        public func validate(name: String) throws {
            try self.validate(self.domain, name: "domain", parent: name, max: 63)
            try self.validate(self.domain, name: "domain", parent: name, min: 1)
            try self.validate(self.domain, name: "domain", parent: name, pattern: "^[a-z0-9](?:[a-z0-9\\-]{0,61}[a-z0-9])?$")
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, max: 55)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, min: 1)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, pattern: "^[\\w-]+_[0-9a-zA-Z]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case domain = "Domain"
            case userPoolId = "UserPoolId"
        }
    }

    public struct DeleteUserPoolDomainResponse: AWSDecodableShape {
        public init() {}
    }

    public struct DeleteUserPoolRequest: AWSEncodableShape {
        /// The ID of the user pool that you want to delete.
        public let userPoolId: String

        @inlinable
        public init(userPoolId: String) {
            self.userPoolId = userPoolId
        }

        public func validate(name: String) throws {
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, max: 55)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, min: 1)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, pattern: "^[\\w-]+_[0-9a-zA-Z]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case userPoolId = "UserPoolId"
        }
    }

    public struct DeleteUserRequest: AWSEncodableShape {
        /// A valid access token that Amazon Cognito issued to the currently signed-in user. Must include a scope claim for
        /// aws.cognito.signin.user.admin.
        public let accessToken: String

        @inlinable
        public init(accessToken: String) {
            self.accessToken = accessToken
        }

        public func validate(name: String) throws {
            try self.validate(self.accessToken, name: "accessToken", parent: name, pattern: "^[A-Za-z0-9-_=.]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case accessToken = "AccessToken"
        }
    }

    public struct DeleteWebAuthnCredentialRequest: AWSEncodableShape {
        /// A valid access token that Amazon Cognito issued to the currently signed-in user. Must include a scope claim for
        /// aws.cognito.signin.user.admin.
        public let accessToken: String
        /// The unique identifier of the passkey that you want to delete.
        public let credentialId: String

        @inlinable
        public init(accessToken: String, credentialId: String) {
            self.accessToken = accessToken
            self.credentialId = credentialId
        }

        public func validate(name: String) throws {
            try self.validate(self.accessToken, name: "accessToken", parent: name, pattern: "^[A-Za-z0-9-_=.]+$")
            try self.validate(self.credentialId, name: "credentialId", parent: name, max: 131072)
        }

        private enum CodingKeys: String, CodingKey {
            case accessToken = "AccessToken"
            case credentialId = "CredentialId"
        }
    }

    public struct DeleteWebAuthnCredentialResponse: AWSDecodableShape {
        public init() {}
    }

    public struct DescribeIdentityProviderRequest: AWSEncodableShape {
        /// The name of the IdP that you want to describe.
        public let providerName: String
        /// The ID of the user pool that has the IdP that you want to describe..
        public let userPoolId: String

        @inlinable
        public init(providerName: String, userPoolId: String) {
            self.providerName = providerName
            self.userPoolId = userPoolId
        }

        public func validate(name: String) throws {
            try self.validate(self.providerName, name: "providerName", parent: name, max: 32)
            try self.validate(self.providerName, name: "providerName", parent: name, min: 1)
            try self.validate(self.providerName, name: "providerName", parent: name, pattern: "^[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}\\p{Z}]+$")
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, max: 55)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, min: 1)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, pattern: "^[\\w-]+_[0-9a-zA-Z]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case providerName = "ProviderName"
            case userPoolId = "UserPoolId"
        }
    }

    public struct DescribeIdentityProviderResponse: AWSDecodableShape {
        /// The details of the requested IdP.
        public let identityProvider: IdentityProviderType

        @inlinable
        public init(identityProvider: IdentityProviderType) {
            self.identityProvider = identityProvider
        }

        private enum CodingKeys: String, CodingKey {
            case identityProvider = "IdentityProvider"
        }
    }

    public struct DescribeManagedLoginBrandingByClientRequest: AWSEncodableShape {
        /// The app client that's assigned to the branding style that you want more information about.
        public let clientId: String
        /// When true, returns values for branding options that are unchanged from Amazon Cognito defaults. When false or when you omit this parameter, returns only values that you customized in your branding style.
        public let returnMergedResources: Bool?
        /// The ID of the user pool that contains the app client where you want more information about the managed login branding style.
        public let userPoolId: String

        @inlinable
        public init(clientId: String, returnMergedResources: Bool? = nil, userPoolId: String) {
            self.clientId = clientId
            self.returnMergedResources = returnMergedResources
            self.userPoolId = userPoolId
        }

        public func validate(name: String) throws {
            try self.validate(self.clientId, name: "clientId", parent: name, max: 128)
            try self.validate(self.clientId, name: "clientId", parent: name, min: 1)
            try self.validate(self.clientId, name: "clientId", parent: name, pattern: "^[\\w+]+$")
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, max: 55)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, min: 1)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, pattern: "^[\\w-]+_[0-9a-zA-Z]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case clientId = "ClientId"
            case returnMergedResources = "ReturnMergedResources"
            case userPoolId = "UserPoolId"
        }
    }

    public struct DescribeManagedLoginBrandingByClientResponse: AWSDecodableShape {
        /// The details of the requested branding style.
        public let managedLoginBranding: ManagedLoginBrandingType?

        @inlinable
        public init(managedLoginBranding: ManagedLoginBrandingType? = nil) {
            self.managedLoginBranding = managedLoginBranding
        }

        private enum CodingKeys: String, CodingKey {
            case managedLoginBranding = "ManagedLoginBranding"
        }
    }

    public struct DescribeManagedLoginBrandingRequest: AWSEncodableShape {
        /// The ID of the managed login branding style that you want to get more information about.
        public let managedLoginBrandingId: String
        /// When true, returns values for branding options that are unchanged from Amazon Cognito defaults. When false or when you omit this parameter, returns only values that you customized in your branding style.
        public let returnMergedResources: Bool?
        /// The ID of the user pool that contains the managed login branding style that you want to get information about.
        public let userPoolId: String

        @inlinable
        public init(managedLoginBrandingId: String, returnMergedResources: Bool? = nil, userPoolId: String) {
            self.managedLoginBrandingId = managedLoginBrandingId
            self.returnMergedResources = returnMergedResources
            self.userPoolId = userPoolId
        }

        public func validate(name: String) throws {
            try self.validate(self.managedLoginBrandingId, name: "managedLoginBrandingId", parent: name, pattern: "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[4][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$")
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, max: 55)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, min: 1)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, pattern: "^[\\w-]+_[0-9a-zA-Z]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case managedLoginBrandingId = "ManagedLoginBrandingId"
            case returnMergedResources = "ReturnMergedResources"
            case userPoolId = "UserPoolId"
        }
    }

    public struct DescribeManagedLoginBrandingResponse: AWSDecodableShape {
        /// The details of the requested branding style.
        public let managedLoginBranding: ManagedLoginBrandingType?

        @inlinable
        public init(managedLoginBranding: ManagedLoginBrandingType? = nil) {
            self.managedLoginBranding = managedLoginBranding
        }

        private enum CodingKeys: String, CodingKey {
            case managedLoginBranding = "ManagedLoginBranding"
        }
    }

    public struct DescribeResourceServerRequest: AWSEncodableShape {
        /// A unique resource server identifier for the resource server. The identifier can be an API friendly name like solar-system-data. You can also set an API URL like https://solar-system-data-api.example.com as your identifier. Amazon Cognito represents scopes in the access token in the format $resource-server-identifier/$scope. Longer scope-identifier strings increase the size of your access tokens.
        public let identifier: String
        /// The ID of the user pool that hosts the resource server.
        public let userPoolId: String

        @inlinable
        public init(identifier: String, userPoolId: String) {
            self.identifier = identifier
            self.userPoolId = userPoolId
        }

        public func validate(name: String) throws {
            try self.validate(self.identifier, name: "identifier", parent: name, max: 256)
            try self.validate(self.identifier, name: "identifier", parent: name, min: 1)
            try self.validate(self.identifier, name: "identifier", parent: name, pattern: "^[\\x21\\x23-\\x5B\\x5D-\\x7E]+$")
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, max: 55)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, min: 1)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, pattern: "^[\\w-]+_[0-9a-zA-Z]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case identifier = "Identifier"
            case userPoolId = "UserPoolId"
        }
    }

    public struct DescribeResourceServerResponse: AWSDecodableShape {
        /// The details of the requested resource server.
        public let resourceServer: ResourceServerType

        @inlinable
        public init(resourceServer: ResourceServerType) {
            self.resourceServer = resourceServer
        }

        private enum CodingKeys: String, CodingKey {
            case resourceServer = "ResourceServer"
        }
    }

    public struct DescribeRiskConfigurationRequest: AWSEncodableShape {
        /// The ID of the app client with the risk configuration that you want to inspect. You can apply default risk configuration at the user pool level and further customize it from user pool defaults at the app-client level. Specify ClientId to inspect client-level configuration, or UserPoolId to inspect pool-level configuration.
        public let clientId: String?
        /// The ID of the user pool with the risk configuration that you want to inspect. You can apply default risk configuration at the user pool level and further customize it from user pool defaults at the app-client level. Specify ClientId to inspect client-level configuration, or UserPoolId to inspect pool-level configuration.
        public let userPoolId: String

        @inlinable
        public init(clientId: String? = nil, userPoolId: String) {
            self.clientId = clientId
            self.userPoolId = userPoolId
        }

        public func validate(name: String) throws {
            try self.validate(self.clientId, name: "clientId", parent: name, max: 128)
            try self.validate(self.clientId, name: "clientId", parent: name, min: 1)
            try self.validate(self.clientId, name: "clientId", parent: name, pattern: "^[\\w+]+$")
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, max: 55)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, min: 1)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, pattern: "^[\\w-]+_[0-9a-zA-Z]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case clientId = "ClientId"
            case userPoolId = "UserPoolId"
        }
    }

    public struct DescribeRiskConfigurationResponse: AWSDecodableShape {
        /// The details of the requested risk configuration.
        public let riskConfiguration: RiskConfigurationType

        @inlinable
        public init(riskConfiguration: RiskConfigurationType) {
            self.riskConfiguration = riskConfiguration
        }

        private enum CodingKeys: String, CodingKey {
            case riskConfiguration = "RiskConfiguration"
        }
    }

    public struct DescribeTermsRequest: AWSEncodableShape {
        /// The ID of the terms documents that you want to describe.
        public let termsId: String
        /// The ID of the user pool that contains the terms documents that you want to describe.
        public let userPoolId: String

        @inlinable
        public init(termsId: String, userPoolId: String) {
            self.termsId = termsId
            self.userPoolId = userPoolId
        }

        public func validate(name: String) throws {
            try self.validate(self.termsId, name: "termsId", parent: name, pattern: "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[4][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$")
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, max: 55)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, min: 1)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, pattern: "^[\\w-]+_[0-9a-zA-Z]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case termsId = "TermsId"
            case userPoolId = "UserPoolId"
        }
    }

    public struct DescribeTermsResponse: AWSDecodableShape {
        /// A summary of the requested terms documents. Includes a unique identifier for later changes to the terms documents.
        public let terms: TermsType?

        @inlinable
        public init(terms: TermsType? = nil) {
            self.terms = terms
        }

        private enum CodingKeys: String, CodingKey {
            case terms = "Terms"
        }
    }

    public struct DescribeUserImportJobRequest: AWSEncodableShape {
        /// The Id of the user import job that you want to describe.
        public let jobId: String
        /// The ID of the user pool that's associated with the import job.
        public let userPoolId: String

        @inlinable
        public init(jobId: String, userPoolId: String) {
            self.jobId = jobId
            self.userPoolId = userPoolId
        }

        public func validate(name: String) throws {
            try self.validate(self.jobId, name: "jobId", parent: name, max: 55)
            try self.validate(self.jobId, name: "jobId", parent: name, min: 1)
            try self.validate(self.jobId, name: "jobId", parent: name, pattern: "^import-[0-9a-zA-Z-]+$")
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, max: 55)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, min: 1)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, pattern: "^[\\w-]+_[0-9a-zA-Z]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case jobId = "JobId"
            case userPoolId = "UserPoolId"
        }
    }

    public struct DescribeUserImportJobResponse: AWSDecodableShape {
        /// The details of the user import job. Includes logging destination, status, and the Amazon S3 pre-signed URL for CSV upload.
        public let userImportJob: UserImportJobType?

        @inlinable
        public init(userImportJob: UserImportJobType? = nil) {
            self.userImportJob = userImportJob
        }

        private enum CodingKeys: String, CodingKey {
            case userImportJob = "UserImportJob"
        }
    }

    public struct DescribeUserPoolClientRequest: AWSEncodableShape {
        /// The ID of the app client that you want to describe.
        public let clientId: String
        /// The ID of the user pool that contains the app client you want to describe.
        public let userPoolId: String

        @inlinable
        public init(clientId: String, userPoolId: String) {
            self.clientId = clientId
            self.userPoolId = userPoolId
        }

        public func validate(name: String) throws {
            try self.validate(self.clientId, name: "clientId", parent: name, max: 128)
            try self.validate(self.clientId, name: "clientId", parent: name, min: 1)
            try self.validate(self.clientId, name: "clientId", parent: name, pattern: "^[\\w+]+$")
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, max: 55)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, min: 1)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, pattern: "^[\\w-]+_[0-9a-zA-Z]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case clientId = "ClientId"
            case userPoolId = "UserPoolId"
        }
    }

    public struct DescribeUserPoolClientResponse: AWSDecodableShape {
        /// The details of the request app client.
        public let userPoolClient: UserPoolClientType?

        @inlinable
        public init(userPoolClient: UserPoolClientType? = nil) {
            self.userPoolClient = userPoolClient
        }

        private enum CodingKeys: String, CodingKey {
            case userPoolClient = "UserPoolClient"
        }
    }

    public struct DescribeUserPoolDomainRequest: AWSEncodableShape {
        /// The domain that you want to describe. For custom domains, this is the fully-qualified domain name, such as auth.example.com. For Amazon Cognito prefix domains, this is the prefix alone, such as auth.
        public let domain: String

        @inlinable
        public init(domain: String) {
            self.domain = domain
        }

        public func validate(name: String) throws {
            try self.validate(self.domain, name: "domain", parent: name, max: 63)
            try self.validate(self.domain, name: "domain", parent: name, min: 1)
            try self.validate(self.domain, name: "domain", parent: name, pattern: "^[a-z0-9](?:[a-z0-9\\-]{0,61}[a-z0-9])?$")
        }

        private enum CodingKeys: String, CodingKey {
            case domain = "Domain"
        }
    }

    public struct DescribeUserPoolDomainResponse: AWSDecodableShape {
        /// The details of the requested user pool domain.
        public let domainDescription: DomainDescriptionType?

        @inlinable
        public init(domainDescription: DomainDescriptionType? = nil) {
            self.domainDescription = domainDescription
        }

        private enum CodingKeys: String, CodingKey {
            case domainDescription = "DomainDescription"
        }
    }

    public struct DescribeUserPoolRequest: AWSEncodableShape {
        /// The ID of the user pool you want to describe.
        public let userPoolId: String

        @inlinable
        public init(userPoolId: String) {
            self.userPoolId = userPoolId
        }

        public func validate(name: String) throws {
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, max: 55)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, min: 1)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, pattern: "^[\\w-]+_[0-9a-zA-Z]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case userPoolId = "UserPoolId"
        }
    }

    public struct DescribeUserPoolResponse: AWSDecodableShape {
        /// The details of the requested user pool.
        public let userPool: UserPoolType?

        @inlinable
        public init(userPool: UserPoolType? = nil) {
            self.userPool = userPool
        }

        private enum CodingKeys: String, CodingKey {
            case userPool = "UserPool"
        }
    }

    public struct DeviceConfigurationType: AWSEncodableShape & AWSDecodableShape {
        /// When true, a remembered device can sign in with device authentication instead of SMS and time-based one-time password (TOTP) factors for multi-factor authentication (MFA).  Whether or not ChallengeRequiredOnNewDevice is true, users who sign in with devices that have not been confirmed or remembered must still provide a second factor in a user pool that requires MFA.
        public let challengeRequiredOnNewDevice: Bool?
        /// When true, Amazon Cognito doesn't automatically remember a user's device when your app sends a ConfirmDevice API request. In your app, create a prompt for your user to choose whether they want to remember their device. Return the user's choice in an UpdateDeviceStatus API request. When DeviceOnlyRememberedOnUserPrompt is false, Amazon Cognito immediately remembers devices that you register in a ConfirmDevice API request.
        public let deviceOnlyRememberedOnUserPrompt: Bool?

        @inlinable
        public init(challengeRequiredOnNewDevice: Bool? = nil, deviceOnlyRememberedOnUserPrompt: Bool? = nil) {
            self.challengeRequiredOnNewDevice = challengeRequiredOnNewDevice
            self.deviceOnlyRememberedOnUserPrompt = deviceOnlyRememberedOnUserPrompt
        }

        private enum CodingKeys: String, CodingKey {
            case challengeRequiredOnNewDevice = "ChallengeRequiredOnNewDevice"
            case deviceOnlyRememberedOnUserPrompt = "DeviceOnlyRememberedOnUserPrompt"
        }
    }

    public struct DeviceSecretVerifierConfigType: AWSEncodableShape {
        /// A password verifier for a user's device. Used in SRP authentication.
        public let passwordVerifier: String?
        /// The salt that you want to use in SRP authentication with the user's device.
        public let salt: String?

        @inlinable
        public init(passwordVerifier: String? = nil, salt: String? = nil) {
            self.passwordVerifier = passwordVerifier
            self.salt = salt
        }

        public func validate(name: String) throws {
            try self.validate(self.passwordVerifier, name: "passwordVerifier", parent: name, max: 131072)
            try self.validate(self.salt, name: "salt", parent: name, max: 131072)
        }

        private enum CodingKeys: String, CodingKey {
            case passwordVerifier = "PasswordVerifier"
            case salt = "Salt"
        }
    }

    public struct DeviceType: AWSDecodableShape {
        /// Metadata about a user's device, like name and last-access source IP.
        public let deviceAttributes: [AttributeType]?
        /// The date and time when the item was created. Amazon Cognito returns this timestamp in UNIX epoch time format. Your SDK might render the output in a
        /// human-readable format like ISO 8601 or a Java Date object.
        public let deviceCreateDate: Date?
        /// The device key, for example us-west-2_EXAMPLE-a1b2c3d4-5678-90ab-cdef-EXAMPLE22222.
        public let deviceKey: String?
        /// The date when the user last signed in with the device.
        public let deviceLastAuthenticatedDate: Date?
        /// The date and time when the item was modified. Amazon Cognito returns this timestamp in UNIX epoch time format. Your SDK might render the output in a
        /// human-readable format like ISO 8601 or a Java Date object.
        public let deviceLastModifiedDate: Date?

        @inlinable
        public init(deviceAttributes: [AttributeType]? = nil, deviceCreateDate: Date? = nil, deviceKey: String? = nil, deviceLastAuthenticatedDate: Date? = nil, deviceLastModifiedDate: Date? = nil) {
            self.deviceAttributes = deviceAttributes
            self.deviceCreateDate = deviceCreateDate
            self.deviceKey = deviceKey
            self.deviceLastAuthenticatedDate = deviceLastAuthenticatedDate
            self.deviceLastModifiedDate = deviceLastModifiedDate
        }

        private enum CodingKeys: String, CodingKey {
            case deviceAttributes = "DeviceAttributes"
            case deviceCreateDate = "DeviceCreateDate"
            case deviceKey = "DeviceKey"
            case deviceLastAuthenticatedDate = "DeviceLastAuthenticatedDate"
            case deviceLastModifiedDate = "DeviceLastModifiedDate"
        }
    }

    public struct DomainDescriptionType: AWSDecodableShape {
        /// The Amazon Web Services account that you created the user pool in.
        public let awsAccountId: String?
        /// The Amazon CloudFront endpoint that hosts your custom domain.
        public let cloudFrontDistribution: String?
        /// The configuration for a custom domain that hosts the sign-up and sign-in webpages for your application.
        public let customDomainConfig: CustomDomainConfigType?
        /// The domain string. For custom domains, this is the fully-qualified domain name, such as auth.example.com. For Amazon Cognito prefix domains, this is the prefix alone, such as auth.
        public let domain: String?
        /// The version of managed login branding that you want to apply to your domain. A value of 1 indicates hosted UI (classic) branding and a version of 2 indicates managed login branding. Managed login requires that your user pool be configured for any feature plan other than Lite.
        public let managedLoginVersion: Int?
        /// The Amazon S3 bucket where the static files for this domain are stored.
        public let s3Bucket: String?
        /// The domain status.
        public let status: DomainStatusType?
        /// The ID of the user pool that the domain is attached to.
        public let userPoolId: String?
        /// The app version.
        public let version: String?

        @inlinable
        public init(awsAccountId: String? = nil, cloudFrontDistribution: String? = nil, customDomainConfig: CustomDomainConfigType? = nil, domain: String? = nil, managedLoginVersion: Int? = nil, s3Bucket: String? = nil, status: DomainStatusType? = nil, userPoolId: String? = nil, version: String? = nil) {
            self.awsAccountId = awsAccountId
            self.cloudFrontDistribution = cloudFrontDistribution
            self.customDomainConfig = customDomainConfig
            self.domain = domain
            self.managedLoginVersion = managedLoginVersion
            self.s3Bucket = s3Bucket
            self.status = status
            self.userPoolId = userPoolId
            self.version = version
        }

        private enum CodingKeys: String, CodingKey {
            case awsAccountId = "AWSAccountId"
            case cloudFrontDistribution = "CloudFrontDistribution"
            case customDomainConfig = "CustomDomainConfig"
            case domain = "Domain"
            case managedLoginVersion = "ManagedLoginVersion"
            case s3Bucket = "S3Bucket"
            case status = "Status"
            case userPoolId = "UserPoolId"
            case version = "Version"
        }
    }

    public struct EmailConfigurationType: AWSEncodableShape & AWSDecodableShape {
        /// The set of configuration rules that can be applied to emails sent using Amazon Simple Email Service. A configuration set is applied to an email by including a reference to the configuration set in the headers of the email. Once applied, all of the rules in that configuration set are applied to the email. Configuration sets can be used to apply the following types of rules to emails:   Event publishing  Amazon Simple Email Service can track the number of send, delivery, open, click, bounce, and complaint events for each email sent. Use event publishing to send information about these events to other Amazon Web Services services such as and Amazon CloudWatch  IP pool management  When leasing dedicated IP addresses with Amazon Simple Email Service, you can create groups of IP addresses, called dedicated IP pools. You can then associate the dedicated IP pools with configuration sets.
        public let configurationSet: String?
        /// Specifies whether Amazon Cognito uses its built-in functionality to send your users email messages, or uses your Amazon Simple Email Service email configuration. Specify one of the following values:  COGNITO_DEFAULT  When Amazon Cognito emails your users, it uses its built-in email functionality. When you use the default option, Amazon Cognito allows only a limited number of emails each day for your user pool. For typical production environments, the default email limit is less than the required delivery volume. To achieve a higher delivery volume, specify DEVELOPER to use your Amazon SES email configuration. To look up the email delivery limit for the default option, see Limits in the Amazon Cognito Developer Guide. The default FROM address is no-reply@verificationemail.com. To customize the FROM address, provide the Amazon Resource Name (ARN) of an Amazon SES verified email address for the SourceArn parameter.  DEVELOPER  When Amazon Cognito emails your users, it uses your Amazon SES configuration. Amazon Cognito calls Amazon SES on your behalf to send email from your verified email address. When you use this option, the email delivery limits are the same limits that apply to your Amazon SES verified email address in your Amazon Web Services account. If you use this option, provide the ARN of an Amazon SES verified email address for the SourceArn parameter. Before Amazon Cognito can email your users, it requires additional permissions to call Amazon SES on your behalf. When you update your user pool with this option, Amazon Cognito creates a service-linked role, which is a type of role in your Amazon Web Services account. This role contains the permissions that allow you to access Amazon SES and send email messages from your email address. For more information about the service-linked role that Amazon Cognito creates, see Using Service-Linked Roles for Amazon Cognito in the Amazon Cognito Developer Guide.
        public let emailSendingAccount: EmailSendingAccountType?
        /// Either the sender’s email address or the sender’s name with their email address. For example, testuser@example.com or Test User . This address appears before the body of the email.
        public let from: String?
        /// The destination to which the receiver of the email should reply.
        public let replyToEmailAddress: String?
        /// The ARN of a verified email address or an address from a verified domain in Amazon SES. You can set a SourceArn email from a verified domain only with an API request. You can set a verified email address, but not an address in a verified domain, in the Amazon Cognito console. Amazon Cognito uses the email address that you provide in one of the following ways, depending on the value that you specify for the EmailSendingAccount parameter:   If you specify COGNITO_DEFAULT, Amazon Cognito uses this address as the custom FROM address when it emails your users using its built-in email account.   If you specify DEVELOPER, Amazon Cognito emails your users with this address by calling Amazon SES on your behalf.   The Region value of the SourceArn parameter must indicate a supported Amazon Web Services Region of your user pool. Typically, the Region in the SourceArn and the user pool Region are the same. For more information, see Amazon SES email configuration regions in the Amazon Cognito Developer Guide.
        public let sourceArn: String?

        @inlinable
        public init(configurationSet: String? = nil, emailSendingAccount: EmailSendingAccountType? = nil, from: String? = nil, replyToEmailAddress: String? = nil, sourceArn: String? = nil) {
            self.configurationSet = configurationSet
            self.emailSendingAccount = emailSendingAccount
            self.from = from
            self.replyToEmailAddress = replyToEmailAddress
            self.sourceArn = sourceArn
        }

        public func validate(name: String) throws {
            try self.validate(self.configurationSet, name: "configurationSet", parent: name, max: 64)
            try self.validate(self.configurationSet, name: "configurationSet", parent: name, min: 1)
            try self.validate(self.configurationSet, name: "configurationSet", parent: name, pattern: "^[a-zA-Z0-9_-]+$")
            try self.validate(self.from, name: "from", parent: name, max: 131072)
            try self.validate(self.replyToEmailAddress, name: "replyToEmailAddress", parent: name, pattern: "^[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}]+@[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}]+$")
            try self.validate(self.sourceArn, name: "sourceArn", parent: name, max: 2048)
            try self.validate(self.sourceArn, name: "sourceArn", parent: name, min: 20)
            try self.validate(self.sourceArn, name: "sourceArn", parent: name, pattern: "^arn:[\\w+=/,.@-]+:[\\w+=/,.@-]+:([\\w+=/,.@-]*)?:[0-9]+:[\\w+=/,.@-]+(:[\\w+=/,.@-]+)?(:[\\w+=/,.@-]+)?$")
        }

        private enum CodingKeys: String, CodingKey {
            case configurationSet = "ConfigurationSet"
            case emailSendingAccount = "EmailSendingAccount"
            case from = "From"
            case replyToEmailAddress = "ReplyToEmailAddress"
            case sourceArn = "SourceArn"
        }
    }

    public struct EmailMfaConfigType: AWSEncodableShape & AWSDecodableShape {
        /// The template for the email messages that your user pool sends to users with codes for MFA and sign-in with email OTPs. The message must contain the {####} placeholder. In the message, Amazon Cognito replaces this placeholder with the code. If you don't provide this parameter, Amazon Cognito sends messages in the default format.
        public let message: String?
        /// The subject of the email messages that your user pool sends to users with codes for MFA and email OTP sign-in.
        public let subject: String?

        @inlinable
        public init(message: String? = nil, subject: String? = nil) {
            self.message = message
            self.subject = subject
        }

        public func validate(name: String) throws {
            try self.validate(self.message, name: "message", parent: name, max: 20000)
            try self.validate(self.message, name: "message", parent: name, min: 6)
            try self.validate(self.message, name: "message", parent: name, pattern: "^[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}\\s*]*\\{####\\}[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}\\s*]*$")
            try self.validate(self.subject, name: "subject", parent: name, pattern: "^[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}\\s]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case message = "Message"
            case subject = "Subject"
        }
    }

    public struct EmailMfaSettingsType: AWSEncodableShape {
        /// Specifies whether email message MFA is active for a user. When the value of this parameter is Enabled, the user will be prompted for MFA during all sign-in attempts, unless device tracking is turned on and the device has been trusted.
        public let enabled: Bool?
        /// Specifies whether email message MFA is the user's preferred method.
        public let preferredMfa: Bool?

        @inlinable
        public init(enabled: Bool? = nil, preferredMfa: Bool? = nil) {
            self.enabled = enabled
            self.preferredMfa = preferredMfa
        }

        private enum CodingKeys: String, CodingKey {
            case enabled = "Enabled"
            case preferredMfa = "PreferredMfa"
        }
    }

    public struct EventContextDataType: AWSDecodableShape {
        /// The user's city.
        public let city: String?
        /// The user's country.
        public let country: String?
        /// The user's device name.
        public let deviceName: String?
        /// The source IP address of your user's device.
        public let ipAddress: String?
        /// The user's time zone.
        public let timezone: String?

        @inlinable
        public init(city: String? = nil, country: String? = nil, deviceName: String? = nil, ipAddress: String? = nil, timezone: String? = nil) {
            self.city = city
            self.country = country
            self.deviceName = deviceName
            self.ipAddress = ipAddress
            self.timezone = timezone
        }

        private enum CodingKeys: String, CodingKey {
            case city = "City"
            case country = "Country"
            case deviceName = "DeviceName"
            case ipAddress = "IpAddress"
            case timezone = "Timezone"
        }
    }

    public struct EventFeedbackType: AWSDecodableShape {
        /// The date that you or your user submitted the feedback.
        public let feedbackDate: Date?
        /// Your feedback to the authentication event. When you provide a FeedbackValue
        /// value of valid, you tell Amazon Cognito that you trust a user session where Amazon Cognito
        /// has evaluated some level of risk. When you provide a FeedbackValue value of
        /// invalid, you tell Amazon Cognito that you don't trust a user session, or you
        /// don't believe that Amazon Cognito evaluated a high-enough risk level.
        public let feedbackValue: FeedbackValueType
        /// The submitter of the event feedback. For example, if you submit event feedback in the Amazon Cognito console, this value is Admin.
        public let provider: String

        @inlinable
        public init(feedbackDate: Date? = nil, feedbackValue: FeedbackValueType, provider: String) {
            self.feedbackDate = feedbackDate
            self.feedbackValue = feedbackValue
            self.provider = provider
        }

        private enum CodingKeys: String, CodingKey {
            case feedbackDate = "FeedbackDate"
            case feedbackValue = "FeedbackValue"
            case provider = "Provider"
        }
    }

    public struct EventRiskType: AWSDecodableShape {
        /// Indicates whether compromised credentials were detected during an authentication event.
        public let compromisedCredentialsDetected: Bool?
        /// The action taken by adaptive authentication. If NoRisk, your user pool took no action. If AccountTakeover, your user pool applied the adaptive authentication automated response that you configured. If Block, your user pool prevented the attempt.
        public let riskDecision: RiskDecisionType?
        /// The risk level that adaptive authentication assessed for the authentication event.
        public let riskLevel: RiskLevelType?

        @inlinable
        public init(compromisedCredentialsDetected: Bool? = nil, riskDecision: RiskDecisionType? = nil, riskLevel: RiskLevelType? = nil) {
            self.compromisedCredentialsDetected = compromisedCredentialsDetected
            self.riskDecision = riskDecision
            self.riskLevel = riskLevel
        }

        private enum CodingKeys: String, CodingKey {
            case compromisedCredentialsDetected = "CompromisedCredentialsDetected"
            case riskDecision = "RiskDecision"
            case riskLevel = "RiskLevel"
        }
    }

    public struct FirehoseConfigurationType: AWSEncodableShape & AWSDecodableShape {
        /// The ARN of an Amazon Data Firehose stream that's the destination for threat protection log export.
        public let streamArn: String?

        @inlinable
        public init(streamArn: String? = nil) {
            self.streamArn = streamArn
        }

        public func validate(name: String) throws {
            try self.validate(self.streamArn, name: "streamArn", parent: name, max: 2048)
            try self.validate(self.streamArn, name: "streamArn", parent: name, min: 20)
            try self.validate(self.streamArn, name: "streamArn", parent: name, pattern: "^arn:[\\w+=/,.@-]+:[\\w+=/,.@-]+:([\\w+=/,.@-]*)?:[0-9]+:[\\w+=/,.@-]+(:[\\w+=/,.@-]+)?(:[\\w+=/,.@-]+)?$")
        }

        private enum CodingKeys: String, CodingKey {
            case streamArn = "StreamArn"
        }
    }

    public struct ForgetDeviceRequest: AWSEncodableShape {
        /// A valid access token that Amazon Cognito issued to the currently signed-in user. Must include a scope claim for
        /// aws.cognito.signin.user.admin.
        public let accessToken: String?
        /// The unique identifier, or device key, of the device that the user wants to forget.
        public let deviceKey: String

        @inlinable
        public init(accessToken: String? = nil, deviceKey: String) {
            self.accessToken = accessToken
            self.deviceKey = deviceKey
        }

        public func validate(name: String) throws {
            try self.validate(self.accessToken, name: "accessToken", parent: name, pattern: "^[A-Za-z0-9-_=.]+$")
            try self.validate(self.deviceKey, name: "deviceKey", parent: name, max: 55)
            try self.validate(self.deviceKey, name: "deviceKey", parent: name, min: 1)
            try self.validate(self.deviceKey, name: "deviceKey", parent: name, pattern: "^[\\w-]+_[0-9a-f-]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case accessToken = "AccessToken"
            case deviceKey = "DeviceKey"
        }
    }

    public struct ForgotPasswordRequest: AWSEncodableShape {
        /// Information that supports analytics outcomes with Amazon Pinpoint, including the
        /// user's endpoint ID. The endpoint ID is a destination for Amazon Pinpoint push notifications, for example a device identifier,
        /// email address, or phone number.
        public let analyticsMetadata: AnalyticsMetadataType?
        /// The ID of the user pool app client associated with the current signed-in user.
        public let clientId: String
        /// A map of custom key-value pairs that you can provide as input for any custom workflows that this action triggers. You create custom workflows by assigning Lambda functions to user pool triggers. When you use the ForgotPassword API action, Amazon Cognito invokes any functions that are assigned to the following triggers: pre sign-up, custom message, and user migration. When Amazon Cognito invokes any of these functions, it passes a JSON payload, which the function receives as input. This payload contains a clientMetadata attribute, which provides the data that you assigned to the ClientMetadata parameter in your ForgotPassword request. In your function code in Lambda, you can process the clientMetadata value to enhance your workflow for your specific needs. For more information, see
        /// Using Lambda triggers in the Amazon Cognito Developer Guide.  When you use the ClientMetadata parameter, note that Amazon Cognito won't do the following:   Store the ClientMetadata value. This data is available only to Lambda triggers that are assigned to a user pool to support custom workflows. If your user pool configuration doesn't include triggers, the ClientMetadata parameter serves no purpose.   Validate the ClientMetadata value.   Encrypt the ClientMetadata value. Don't send sensitive information in this parameter.
        public let clientMetadata: [String: String]?
        /// A keyed-hash message authentication code (HMAC) calculated using the secret key of a user pool client and username plus the client ID in the message. For more information about SecretHash, see Computing secret hash values.
        public let secretHash: String?
        /// Contextual data about your user session like the device fingerprint, IP address, or location. Amazon Cognito threat
        /// protection evaluates the risk of an authentication event based on the context that your app generates and passes to Amazon Cognito
        /// when it makes API requests. For more information, see Collecting data for threat protection in
        /// applications.
        public let userContextData: UserContextDataType?
        /// The name of the user that you want to query or modify. The value of this parameter is typically your user's username, but it can be any of their alias attributes. If username isn't an alias attribute in your user pool, this value must be the sub of a local user or the username of a user from a third-party IdP.
        public let username: String

        @inlinable
        public init(analyticsMetadata: AnalyticsMetadataType? = nil, clientId: String, clientMetadata: [String: String]? = nil, secretHash: String? = nil, userContextData: UserContextDataType? = nil, username: String) {
            self.analyticsMetadata = analyticsMetadata
            self.clientId = clientId
            self.clientMetadata = clientMetadata
            self.secretHash = secretHash
            self.userContextData = userContextData
            self.username = username
        }

        public func validate(name: String) throws {
            try self.analyticsMetadata?.validate(name: "\(name).analyticsMetadata")
            try self.validate(self.clientId, name: "clientId", parent: name, max: 128)
            try self.validate(self.clientId, name: "clientId", parent: name, min: 1)
            try self.validate(self.clientId, name: "clientId", parent: name, pattern: "^[\\w+]+$")
            try self.clientMetadata?.forEach {
                try validate($0.key, name: "clientMetadata.key", parent: name, max: 131072)
                try validate($0.value, name: "clientMetadata[\"\($0.key)\"]", parent: name, max: 131072)
            }
            try self.validate(self.secretHash, name: "secretHash", parent: name, max: 128)
            try self.validate(self.secretHash, name: "secretHash", parent: name, min: 1)
            try self.validate(self.secretHash, name: "secretHash", parent: name, pattern: "^[\\w+=/]+$")
            try self.userContextData?.validate(name: "\(name).userContextData")
            try self.validate(self.username, name: "username", parent: name, max: 128)
            try self.validate(self.username, name: "username", parent: name, min: 1)
            try self.validate(self.username, name: "username", parent: name, pattern: "^[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case analyticsMetadata = "AnalyticsMetadata"
            case clientId = "ClientId"
            case clientMetadata = "ClientMetadata"
            case secretHash = "SecretHash"
            case userContextData = "UserContextData"
            case username = "Username"
        }
    }

    public struct ForgotPasswordResponse: AWSDecodableShape {
        /// Information about the phone number or email address that Amazon Cognito sent the password-recovery code to.
        public let codeDeliveryDetails: CodeDeliveryDetailsType?

        @inlinable
        public init(codeDeliveryDetails: CodeDeliveryDetailsType? = nil) {
            self.codeDeliveryDetails = codeDeliveryDetails
        }

        private enum CodingKeys: String, CodingKey {
            case codeDeliveryDetails = "CodeDeliveryDetails"
        }
    }

    public struct GetCSVHeaderRequest: AWSEncodableShape {
        /// The ID of the user pool that you want to import users into.
        public let userPoolId: String

        @inlinable
        public init(userPoolId: String) {
            self.userPoolId = userPoolId
        }

        public func validate(name: String) throws {
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, max: 55)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, min: 1)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, pattern: "^[\\w-]+_[0-9a-zA-Z]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case userPoolId = "UserPoolId"
        }
    }

    public struct GetCSVHeaderResponse: AWSDecodableShape {
        /// A comma-separated list of attributes from your user pool. Save this output to a .csv file and populate it with the attributes of the users that you want to import.
        public let csvHeader: [String]?
        /// The ID of the requested user pool.
        public let userPoolId: String?

        @inlinable
        public init(csvHeader: [String]? = nil, userPoolId: String? = nil) {
            self.csvHeader = csvHeader
            self.userPoolId = userPoolId
        }

        private enum CodingKeys: String, CodingKey {
            case csvHeader = "CSVHeader"
            case userPoolId = "UserPoolId"
        }
    }

    public struct GetDeviceRequest: AWSEncodableShape {
        /// A valid access token that Amazon Cognito issued to the currently signed-in user. Must include a scope claim for
        /// aws.cognito.signin.user.admin.
        public let accessToken: String?
        /// The key of the device that you want to get information about.
        public let deviceKey: String

        @inlinable
        public init(accessToken: String? = nil, deviceKey: String) {
            self.accessToken = accessToken
            self.deviceKey = deviceKey
        }

        public func validate(name: String) throws {
            try self.validate(self.accessToken, name: "accessToken", parent: name, pattern: "^[A-Za-z0-9-_=.]+$")
            try self.validate(self.deviceKey, name: "deviceKey", parent: name, max: 55)
            try self.validate(self.deviceKey, name: "deviceKey", parent: name, min: 1)
            try self.validate(self.deviceKey, name: "deviceKey", parent: name, pattern: "^[\\w-]+_[0-9a-f-]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case accessToken = "AccessToken"
            case deviceKey = "DeviceKey"
        }
    }

    public struct GetDeviceResponse: AWSDecodableShape {
        /// Details of the requested device. Includes device information, last-accessed and created dates, and the device key.
        public let device: DeviceType

        @inlinable
        public init(device: DeviceType) {
            self.device = device
        }

        private enum CodingKeys: String, CodingKey {
            case device = "Device"
        }
    }

    public struct GetGroupRequest: AWSEncodableShape {
        /// The name of the group that you want to get information about.
        public let groupName: String
        /// The ID of the user pool that contains the group that you want to query.
        public let userPoolId: String

        @inlinable
        public init(groupName: String, userPoolId: String) {
            self.groupName = groupName
            self.userPoolId = userPoolId
        }

        public func validate(name: String) throws {
            try self.validate(self.groupName, name: "groupName", parent: name, max: 128)
            try self.validate(self.groupName, name: "groupName", parent: name, min: 1)
            try self.validate(self.groupName, name: "groupName", parent: name, pattern: "^[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}]+$")
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, max: 55)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, min: 1)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, pattern: "^[\\w-]+_[0-9a-zA-Z]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case groupName = "GroupName"
            case userPoolId = "UserPoolId"
        }
    }

    public struct GetGroupResponse: AWSDecodableShape {
        /// A container for the requested group. Includes description, precedence, and IAM role values.
        public let group: GroupType?

        @inlinable
        public init(group: GroupType? = nil) {
            self.group = group
        }

        private enum CodingKeys: String, CodingKey {
            case group = "Group"
        }
    }

    public struct GetIdentityProviderByIdentifierRequest: AWSEncodableShape {
        /// The identifier that you assigned to your user pool. The identifier is an alternative name for an IdP that is distinct from the IdP name. For example, an IdP with a name of MyIdP might have an identifier of the email domain example.com.
        public let idpIdentifier: String
        /// The ID of the user pool where you want to get information about the IdP.
        public let userPoolId: String

        @inlinable
        public init(idpIdentifier: String, userPoolId: String) {
            self.idpIdentifier = idpIdentifier
            self.userPoolId = userPoolId
        }

        public func validate(name: String) throws {
            try self.validate(self.idpIdentifier, name: "idpIdentifier", parent: name, max: 40)
            try self.validate(self.idpIdentifier, name: "idpIdentifier", parent: name, min: 1)
            try self.validate(self.idpIdentifier, name: "idpIdentifier", parent: name, pattern: "^[\\w\\s+=.@-]+$")
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, max: 55)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, min: 1)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, pattern: "^[\\w-]+_[0-9a-zA-Z]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case idpIdentifier = "IdpIdentifier"
            case userPoolId = "UserPoolId"
        }
    }

    public struct GetIdentityProviderByIdentifierResponse: AWSDecodableShape {
        /// The configuration of the IdP in your user pool. Includes additional identifiers, the IdP name and type, and trust-relationship details like the issuer URL.
        public let identityProvider: IdentityProviderType

        @inlinable
        public init(identityProvider: IdentityProviderType) {
            self.identityProvider = identityProvider
        }

        private enum CodingKeys: String, CodingKey {
            case identityProvider = "IdentityProvider"
        }
    }

    public struct GetLogDeliveryConfigurationRequest: AWSEncodableShape {
        /// The ID of the user pool that has the logging configuration that you want to view.
        public let userPoolId: String

        @inlinable
        public init(userPoolId: String) {
            self.userPoolId = userPoolId
        }

        public func validate(name: String) throws {
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, max: 55)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, min: 1)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, pattern: "^[\\w-]+_[0-9a-zA-Z]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case userPoolId = "UserPoolId"
        }
    }

    public struct GetLogDeliveryConfigurationResponse: AWSDecodableShape {
        /// The logging configuration of the requested user pool. Includes types of logs configured and their destinations.
        public let logDeliveryConfiguration: LogDeliveryConfigurationType?

        @inlinable
        public init(logDeliveryConfiguration: LogDeliveryConfigurationType? = nil) {
            self.logDeliveryConfiguration = logDeliveryConfiguration
        }

        private enum CodingKeys: String, CodingKey {
            case logDeliveryConfiguration = "LogDeliveryConfiguration"
        }
    }

    public struct GetSigningCertificateRequest: AWSEncodableShape {
        /// The ID of the user pool where you want to view the signing certificate.
        public let userPoolId: String

        @inlinable
        public init(userPoolId: String) {
            self.userPoolId = userPoolId
        }

        public func validate(name: String) throws {
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, max: 55)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, min: 1)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, pattern: "^[\\w-]+_[0-9a-zA-Z]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case userPoolId = "UserPoolId"
        }
    }

    public struct GetSigningCertificateResponse: AWSDecodableShape {
        /// The x.509 certificate that signs SAML 2.0 authentication requests for your user pool.
        public let certificate: String?

        @inlinable
        public init(certificate: String? = nil) {
            self.certificate = certificate
        }

        private enum CodingKeys: String, CodingKey {
            case certificate = "Certificate"
        }
    }

    public struct GetTokensFromRefreshTokenRequest: AWSEncodableShape {
        /// The app client that issued the refresh token to the user who wants to request new tokens.
        public let clientId: String
        /// A map of custom key-value pairs that you can provide as input for certain custom workflows that this action triggers. You create custom workflows by assigning Lambda functions to user pool triggers. When you use the GetTokensFromRefreshToken API action, Amazon Cognito invokes the Lambda function the pre token generation trigger. For more information, see
        /// Using Lambda triggers in the Amazon Cognito Developer Guide.  When you use the ClientMetadata parameter, note that Amazon Cognito won't do the following:   Store the ClientMetadata value. This data is available only to Lambda triggers that are assigned to a user pool to support custom workflows. If your user pool configuration doesn't include triggers, the ClientMetadata parameter serves no purpose.   Validate the ClientMetadata value.   Encrypt the ClientMetadata value. Don't send sensitive information in this parameter.
        public let clientMetadata: [String: String]?
        /// The client secret of the requested app client, if the client has a secret.
        public let clientSecret: String?
        /// When you enable device remembering, Amazon Cognito issues a device key that you can use for device authentication that bypasses multi-factor authentication (MFA). To implement GetTokensFromRefreshToken in a user pool with device remembering, you must capture the device key from the initial authentication request. If your application doesn't provide the key of a registered device, Amazon Cognito issues a new one. You must provide the confirmed device key in this request if device remembering is enabled in your user pool. For more information about device remembering, see Working with devices.
        public let deviceKey: String?
        /// A valid refresh token that can authorize the request for new tokens. When refresh token rotation is active in the requested app client, this token is invalidated after the request is complete and after an optional grace period.
        public let refreshToken: String

        @inlinable
        public init(clientId: String, clientMetadata: [String: String]? = nil, clientSecret: String? = nil, deviceKey: String? = nil, refreshToken: String) {
            self.clientId = clientId
            self.clientMetadata = clientMetadata
            self.clientSecret = clientSecret
            self.deviceKey = deviceKey
            self.refreshToken = refreshToken
        }

        public func validate(name: String) throws {
            try self.validate(self.clientId, name: "clientId", parent: name, max: 128)
            try self.validate(self.clientId, name: "clientId", parent: name, min: 1)
            try self.validate(self.clientId, name: "clientId", parent: name, pattern: "^[\\w+]+$")
            try self.clientMetadata?.forEach {
                try validate($0.key, name: "clientMetadata.key", parent: name, max: 131072)
                try validate($0.value, name: "clientMetadata[\"\($0.key)\"]", parent: name, max: 131072)
            }
            try self.validate(self.clientSecret, name: "clientSecret", parent: name, max: 64)
            try self.validate(self.clientSecret, name: "clientSecret", parent: name, min: 1)
            try self.validate(self.clientSecret, name: "clientSecret", parent: name, pattern: "^[\\w+]+$")
            try self.validate(self.deviceKey, name: "deviceKey", parent: name, max: 55)
            try self.validate(self.deviceKey, name: "deviceKey", parent: name, min: 1)
            try self.validate(self.deviceKey, name: "deviceKey", parent: name, pattern: "^[\\w-]+_[0-9a-f-]+$")
            try self.validate(self.refreshToken, name: "refreshToken", parent: name, pattern: "^[A-Za-z0-9-_=.]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case clientId = "ClientId"
            case clientMetadata = "ClientMetadata"
            case clientSecret = "ClientSecret"
            case deviceKey = "DeviceKey"
            case refreshToken = "RefreshToken"
        }
    }

    public struct GetTokensFromRefreshTokenResponse: AWSDecodableShape {
        public let authenticationResult: AuthenticationResultType?

        @inlinable
        public init(authenticationResult: AuthenticationResultType? = nil) {
            self.authenticationResult = authenticationResult
        }

        private enum CodingKeys: String, CodingKey {
            case authenticationResult = "AuthenticationResult"
        }
    }

    public struct GetUICustomizationRequest: AWSEncodableShape {
        /// The ID of the app client that you want to query for branding settings.
        public let clientId: String?
        /// The ID of the user pool that you want to query for branding settings.
        public let userPoolId: String

        @inlinable
        public init(clientId: String? = nil, userPoolId: String) {
            self.clientId = clientId
            self.userPoolId = userPoolId
        }

        public func validate(name: String) throws {
            try self.validate(self.clientId, name: "clientId", parent: name, max: 128)
            try self.validate(self.clientId, name: "clientId", parent: name, min: 1)
            try self.validate(self.clientId, name: "clientId", parent: name, pattern: "^[\\w+]+$")
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, max: 55)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, min: 1)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, pattern: "^[\\w-]+_[0-9a-zA-Z]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case clientId = "ClientId"
            case userPoolId = "UserPoolId"
        }
    }

    public struct GetUICustomizationResponse: AWSDecodableShape {
        /// Information about the classic hosted UI custom CSS and logo-image branding that you applied to the user pool or app client.
        public let uiCustomization: UICustomizationType

        @inlinable
        public init(uiCustomization: UICustomizationType) {
            self.uiCustomization = uiCustomization
        }

        private enum CodingKeys: String, CodingKey {
            case uiCustomization = "UICustomization"
        }
    }

    public struct GetUserAttributeVerificationCodeRequest: AWSEncodableShape {
        /// A valid access token that Amazon Cognito issued to the currently signed-in user. Must include a scope claim for
        /// aws.cognito.signin.user.admin.
        public let accessToken: String
        /// The name of the attribute that the user wants to verify, for example email.
        public let attributeName: String
        /// A map of custom key-value pairs that you can provide as input for any custom workflows that this action triggers. You create custom workflows by assigning Lambda functions to user pool triggers. When you use the GetUserAttributeVerificationCode API action, Amazon Cognito invokes the function that is assigned to the custom message trigger. When Amazon Cognito invokes this function, it passes a JSON payload, which the function receives as input. This payload contains a clientMetadata attribute, which provides the data that you assigned to the ClientMetadata parameter in your GetUserAttributeVerificationCode request. In your function code in Lambda, you can process the clientMetadata value to enhance your workflow for your specific needs. For more information, see
        /// Using Lambda triggers in the Amazon Cognito Developer Guide.  When you use the ClientMetadata parameter, note that Amazon Cognito won't do the following:   Store the ClientMetadata value. This data is available only to Lambda triggers that are assigned to a user pool to support custom workflows. If your user pool configuration doesn't include triggers, the ClientMetadata parameter serves no purpose.   Validate the ClientMetadata value.   Encrypt the ClientMetadata value. Don't send sensitive information in this parameter.
        public let clientMetadata: [String: String]?

        @inlinable
        public init(accessToken: String, attributeName: String, clientMetadata: [String: String]? = nil) {
            self.accessToken = accessToken
            self.attributeName = attributeName
            self.clientMetadata = clientMetadata
        }

        public func validate(name: String) throws {
            try self.validate(self.accessToken, name: "accessToken", parent: name, pattern: "^[A-Za-z0-9-_=.]+$")
            try self.validate(self.attributeName, name: "attributeName", parent: name, max: 32)
            try self.validate(self.attributeName, name: "attributeName", parent: name, min: 1)
            try self.validate(self.attributeName, name: "attributeName", parent: name, pattern: "^[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}]+$")
            try self.clientMetadata?.forEach {
                try validate($0.key, name: "clientMetadata.key", parent: name, max: 131072)
                try validate($0.value, name: "clientMetadata[\"\($0.key)\"]", parent: name, max: 131072)
            }
        }

        private enum CodingKeys: String, CodingKey {
            case accessToken = "AccessToken"
            case attributeName = "AttributeName"
            case clientMetadata = "ClientMetadata"
        }
    }

    public struct GetUserAttributeVerificationCodeResponse: AWSDecodableShape {
        /// Information about the delivery destination of the user attribute verification code.
        public let codeDeliveryDetails: CodeDeliveryDetailsType?

        @inlinable
        public init(codeDeliveryDetails: CodeDeliveryDetailsType? = nil) {
            self.codeDeliveryDetails = codeDeliveryDetails
        }

        private enum CodingKeys: String, CodingKey {
            case codeDeliveryDetails = "CodeDeliveryDetails"
        }
    }

    public struct GetUserAuthFactorsRequest: AWSEncodableShape {
        /// A valid access token that Amazon Cognito issued to the currently signed-in user. Must include a scope claim for
        /// aws.cognito.signin.user.admin.
        public let accessToken: String

        @inlinable
        public init(accessToken: String) {
            self.accessToken = accessToken
        }

        public func validate(name: String) throws {
            try self.validate(self.accessToken, name: "accessToken", parent: name, pattern: "^[A-Za-z0-9-_=.]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case accessToken = "AccessToken"
        }
    }

    public struct GetUserAuthFactorsResponse: AWSDecodableShape {
        /// The authentication types that are available to the user with USER_AUTH sign-in, for example ["PASSWORD", "WEB_AUTHN"].
        public let configuredUserAuthFactors: [AuthFactorType]?
        /// The challenge method that Amazon Cognito returns to the user in response to sign-in requests. Users can prefer SMS message, email message, or TOTP MFA.
        public let preferredMfaSetting: String?
        /// The MFA options that are activated for the user. The possible values in this list are SMS_MFA, EMAIL_OTP, and SOFTWARE_TOKEN_MFA.
        public let userMFASettingList: [String]?
        /// The name of the user who is eligible for the authentication factors in the response.
        public let username: String

        @inlinable
        public init(configuredUserAuthFactors: [AuthFactorType]? = nil, preferredMfaSetting: String? = nil, userMFASettingList: [String]? = nil, username: String) {
            self.configuredUserAuthFactors = configuredUserAuthFactors
            self.preferredMfaSetting = preferredMfaSetting
            self.userMFASettingList = userMFASettingList
            self.username = username
        }

        private enum CodingKeys: String, CodingKey {
            case configuredUserAuthFactors = "ConfiguredUserAuthFactors"
            case preferredMfaSetting = "PreferredMfaSetting"
            case userMFASettingList = "UserMFASettingList"
            case username = "Username"
        }
    }

    public struct GetUserPoolMfaConfigRequest: AWSEncodableShape {
        /// The ID of the user pool where you want to query WebAuthn and MFA configuration.
        public let userPoolId: String

        @inlinable
        public init(userPoolId: String) {
            self.userPoolId = userPoolId
        }

        public func validate(name: String) throws {
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, max: 55)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, min: 1)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, pattern: "^[\\w-]+_[0-9a-zA-Z]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case userPoolId = "UserPoolId"
        }
    }

    public struct GetUserPoolMfaConfigResponse: AWSDecodableShape {
        /// Shows configuration for user pool email message MFA and sign-in with one-time passwords (OTPs). Includes the subject and body of the email message template for sign-in and MFA messages. To activate this setting, your user pool must be in the  Essentials tier or higher.
        public let emailMfaConfiguration: EmailMfaConfigType?
        /// Displays the state of multi-factor authentication (MFA) as on, off, or optional. When ON, all users must set up MFA before they can sign in. When OPTIONAL, your application must make a client-side determination of whether a user wants to register an MFA device. For user pools with adaptive authentication with threat protection, choose OPTIONAL. When MfaConfiguration is OPTIONAL, managed login doesn't automatically prompt users to set up MFA. Amazon Cognito generates MFA prompts in API responses and in managed login for users who have chosen and configured a preferred MFA factor.
        public let mfaConfiguration: UserPoolMfaType?
        /// Shows user pool configuration for SMS message MFA. Includes the message template and the SMS message sending configuration for Amazon SNS.
        public let smsMfaConfiguration: SmsMfaConfigType?
        /// Shows user pool configuration for time-based one-time password (TOTP) MFA. Includes TOTP enabled or disabled state.
        public let softwareTokenMfaConfiguration: SoftwareTokenMfaConfigType?
        /// Shows user pool configuration for sign-in with passkey authenticators like biometric devices and security keys. Passkeys are not eligible MFA factors. They are instead an eligible primary sign-in factor for choice-based authentication, or the USER_AUTH flow.
        public let webAuthnConfiguration: WebAuthnConfigurationType?

        @inlinable
        public init(emailMfaConfiguration: EmailMfaConfigType? = nil, mfaConfiguration: UserPoolMfaType? = nil, smsMfaConfiguration: SmsMfaConfigType? = nil, softwareTokenMfaConfiguration: SoftwareTokenMfaConfigType? = nil, webAuthnConfiguration: WebAuthnConfigurationType? = nil) {
            self.emailMfaConfiguration = emailMfaConfiguration
            self.mfaConfiguration = mfaConfiguration
            self.smsMfaConfiguration = smsMfaConfiguration
            self.softwareTokenMfaConfiguration = softwareTokenMfaConfiguration
            self.webAuthnConfiguration = webAuthnConfiguration
        }

        private enum CodingKeys: String, CodingKey {
            case emailMfaConfiguration = "EmailMfaConfiguration"
            case mfaConfiguration = "MfaConfiguration"
            case smsMfaConfiguration = "SmsMfaConfiguration"
            case softwareTokenMfaConfiguration = "SoftwareTokenMfaConfiguration"
            case webAuthnConfiguration = "WebAuthnConfiguration"
        }
    }

    public struct GetUserRequest: AWSEncodableShape {
        /// A valid access token that Amazon Cognito issued to the currently signed-in user. Must include a scope claim for
        /// aws.cognito.signin.user.admin.
        public let accessToken: String

        @inlinable
        public init(accessToken: String) {
            self.accessToken = accessToken
        }

        public func validate(name: String) throws {
            try self.validate(self.accessToken, name: "accessToken", parent: name, pattern: "^[A-Za-z0-9-_=.]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case accessToken = "AccessToken"
        }
    }

    public struct GetUserResponse: AWSDecodableShape {
        ///  This response parameter is no longer supported. It provides information only about SMS MFA configurations. It doesn't provide information about time-based one-time password (TOTP) software token MFA configurations. To look up information about either type of MFA configuration, use UserMFASettingList instead.
        public let mfaOptions: [MFAOptionType]?
        /// The user's preferred MFA. Users can prefer SMS message, email message, or TOTP MFA.
        public let preferredMfaSetting: String?
        /// An array of name-value pairs representing user attributes. Custom attributes are prepended with the custom: prefix.
        public let userAttributes: [AttributeType]
        /// The MFA options that are activated for the user. The possible values in this list are SMS_MFA, EMAIL_OTP, and SOFTWARE_TOKEN_MFA.
        public let userMFASettingList: [String]?
        /// The name of the user that you requested.
        public let username: String

        @inlinable
        public init(mfaOptions: [MFAOptionType]? = nil, preferredMfaSetting: String? = nil, userAttributes: [AttributeType], userMFASettingList: [String]? = nil, username: String) {
            self.mfaOptions = mfaOptions
            self.preferredMfaSetting = preferredMfaSetting
            self.userAttributes = userAttributes
            self.userMFASettingList = userMFASettingList
            self.username = username
        }

        private enum CodingKeys: String, CodingKey {
            case mfaOptions = "MFAOptions"
            case preferredMfaSetting = "PreferredMfaSetting"
            case userAttributes = "UserAttributes"
            case userMFASettingList = "UserMFASettingList"
            case username = "Username"
        }
    }

    public struct GlobalSignOutRequest: AWSEncodableShape {
        /// A valid access token that Amazon Cognito issued to the currently signed-in user. Must include a scope claim for
        /// aws.cognito.signin.user.admin.
        public let accessToken: String

        @inlinable
        public init(accessToken: String) {
            self.accessToken = accessToken
        }

        public func validate(name: String) throws {
            try self.validate(self.accessToken, name: "accessToken", parent: name, pattern: "^[A-Za-z0-9-_=.]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case accessToken = "AccessToken"
        }
    }

    public struct GlobalSignOutResponse: AWSDecodableShape {
        public init() {}
    }

    public struct GroupType: AWSDecodableShape {
        /// The date and time when the item was created. Amazon Cognito returns this timestamp in UNIX epoch time format. Your SDK might render the output in a
        /// human-readable format like ISO 8601 or a Java Date object.
        public let creationDate: Date?
        /// A friendly description of the group.
        public let description: String?
        /// The name of the group.
        public let groupName: String?
        /// The date and time when the item was modified. Amazon Cognito returns this timestamp in UNIX epoch time format. Your SDK might render the output in a
        /// human-readable format like ISO 8601 or a Java Date object.
        public let lastModifiedDate: Date?
        /// A non-negative integer value that specifies the precedence of this group relative to the other groups that a user can belong to in the user pool. Zero is the highest precedence value. Groups with lower Precedence values take precedence over groups with higher ornull Precedence values. If a user belongs to two or more groups, it is the group with the lowest precedence value whose role ARN is given in the user's tokens for the cognito:roles and cognito:preferred_role claims. Two groups can have the same Precedence value. If this happens, neither group takes precedence over the other. If two groups with the same Precedence have the same role ARN, that role is used in the cognito:preferred_role claim in tokens for users in each group. If the two groups have different role ARNs, the cognito:preferred_role claim isn't set in users' tokens. The default Precedence value is null.
        public let precedence: Int?
        /// The ARN of the IAM role associated with the group. If a group has the highest priority of a user's groups, users who authenticate with an identity pool get credentials for the RoleArn that's associated with the group.
        public let roleArn: String?
        /// The ID of the user pool that contains the group.
        public let userPoolId: String?

        @inlinable
        public init(creationDate: Date? = nil, description: String? = nil, groupName: String? = nil, lastModifiedDate: Date? = nil, precedence: Int? = nil, roleArn: String? = nil, userPoolId: String? = nil) {
            self.creationDate = creationDate
            self.description = description
            self.groupName = groupName
            self.lastModifiedDate = lastModifiedDate
            self.precedence = precedence
            self.roleArn = roleArn
            self.userPoolId = userPoolId
        }

        private enum CodingKeys: String, CodingKey {
            case creationDate = "CreationDate"
            case description = "Description"
            case groupName = "GroupName"
            case lastModifiedDate = "LastModifiedDate"
            case precedence = "Precedence"
            case roleArn = "RoleArn"
            case userPoolId = "UserPoolId"
        }
    }

    public struct HttpHeader: AWSEncodableShape {
        /// The header name.
        public let headerName: String?
        /// The header value.
        public let headerValue: String?

        @inlinable
        public init(headerName: String? = nil, headerValue: String? = nil) {
            self.headerName = headerName
            self.headerValue = headerValue
        }

        public func validate(name: String) throws {
            try self.validate(self.headerName, name: "headerName", parent: name, max: 131072)
            try self.validate(self.headerValue, name: "headerValue", parent: name, max: 131072)
        }

        private enum CodingKeys: String, CodingKey {
            case headerName = "headerName"
            case headerValue = "headerValue"
        }
    }

    public struct IdentityProviderType: AWSDecodableShape {
        /// A mapping of IdP attributes to standard and custom user pool attributes.
        public let attributeMapping: [String: String]?
        /// The date and time when the item was created. Amazon Cognito returns this timestamp in UNIX epoch time format. Your SDK might render the output in a
        /// human-readable format like ISO 8601 or a Java Date object.
        public let creationDate: Date?
        /// A list of IdP identifiers. IdP identifiers are strings that represent friendly names or domain names of IdPs, for example MyIdP or auth.example.com. You can choose to route user authorization requests to the right IdP with either IdP identifiers or IdP names. For more information, see identity_provider and idp_identifier at Authorize endpoint.
        public let idpIdentifiers: [String]?
        /// The date and time when the item was modified. Amazon Cognito returns this timestamp in UNIX epoch time format. Your SDK might render the output in a
        /// human-readable format like ISO 8601 or a Java Date object.
        public let lastModifiedDate: Date?
        /// The scopes, URLs, and identifiers for your external identity provider. The following
        /// examples describe the provider detail keys for each IdP type. These values and their
        /// schema are subject to change. Social IdP authorize_scopes values must match
        /// the values listed here.  OpenID Connect (OIDC)  Amazon Cognito accepts the following elements when it can't discover endpoint URLs from oidc_issuer: attributes_url, authorize_url, jwks_uri, token_url. Create or update request: "ProviderDetails": { "attributes_request_method": "GET", "attributes_url": "https://auth.example.com/userInfo", "authorize_scopes": "openid profile email", "authorize_url": "https://auth.example.com/authorize", "client_id": "1example23456789", "client_secret": "provider-app-client-secret", "jwks_uri": "https://auth.example.com/.well-known/jwks.json", "oidc_issuer": "https://auth.example.com", "token_url": "https://example.com/token" }  Describe response: "ProviderDetails": { "attributes_request_method": "GET", "attributes_url": "https://auth.example.com/userInfo", "attributes_url_add_attributes": "false", "authorize_scopes": "openid profile email", "authorize_url": "https://auth.example.com/authorize", "client_id": "1example23456789", "client_secret": "provider-app-client-secret", "jwks_uri": "https://auth.example.com/.well-known/jwks.json", "oidc_issuer": "https://auth.example.com", "token_url": "https://example.com/token" }   SAML  Create or update request with Metadata URL: "ProviderDetails": { "IDPInit": "true", "IDPSignout": "true", "EncryptedResponses" : "true", "MetadataURL": "https://auth.example.com/sso/saml/metadata", "RequestSigningAlgorithm": "rsa-sha256" }  Create or update request with Metadata file: "ProviderDetails": { "IDPInit": "true", "IDPSignout": "true", "EncryptedResponses" : "true",   "MetadataFile": "[metadata XML]", "RequestSigningAlgorithm": "rsa-sha256" }  The value of MetadataFile must be the plaintext metadata document with all  quote (") characters escaped by backslashes. Describe response: "ProviderDetails": { "IDPInit": "true", "IDPSignout": "true", "EncryptedResponses" : "true", "ActiveEncryptionCertificate": "[certificate]", "MetadataURL": "https://auth.example.com/sso/saml/metadata", "RequestSigningAlgorithm": "rsa-sha256", "SLORedirectBindingURI": "https://auth.example.com/slo/saml", "SSORedirectBindingURI": "https://auth.example.com/sso/saml" }   LoginWithAmazon  Create or update request: "ProviderDetails": { "authorize_scopes": "profile postal_code", "client_id": "amzn1.application-oa2-client.1example23456789", "client_secret": "provider-app-client-secret"  Describe response: "ProviderDetails": { "attributes_url": "https://api.amazon.com/user/profile", "attributes_url_add_attributes": "false", "authorize_scopes": "profile postal_code", "authorize_url": "https://www.amazon.com/ap/oa", "client_id": "amzn1.application-oa2-client.1example23456789", "client_secret": "provider-app-client-secret", "token_request_method": "POST", "token_url": "https://api.amazon.com/auth/o2/token" }   Google  Create or update request: "ProviderDetails": { "authorize_scopes": "email profile openid", "client_id": "1example23456789.apps.googleusercontent.com", "client_secret": "provider-app-client-secret" }  Describe response: "ProviderDetails": { "attributes_url": "https://people.googleapis.com/v1/people/me?personFields=", "attributes_url_add_attributes": "true", "authorize_scopes": "email profile openid", "authorize_url": "https://accounts.google.com/o/oauth2/v2/auth", "client_id": "1example23456789.apps.googleusercontent.com", "client_secret": "provider-app-client-secret", "oidc_issuer": "https://accounts.google.com", "token_request_method": "POST", "token_url": "https://www.googleapis.com/oauth2/v4/token" }   SignInWithApple  Create or update request: "ProviderDetails": { "authorize_scopes": "email name", "client_id": "com.example.cognito", "private_key": "1EXAMPLE",  "key_id": "2EXAMPLE", "team_id": "3EXAMPLE" }  Describe response: "ProviderDetails": { "attributes_url_add_attributes": "false", "authorize_scopes": "email name", "authorize_url": "https://appleid.apple.com/auth/authorize", "client_id": "com.example.cognito", "key_id": "1EXAMPLE", "oidc_issuer": "https://appleid.apple.com", "team_id": "2EXAMPLE", "token_request_method": "POST", "token_url": "https://appleid.apple.com/auth/token" }   Facebook  Create or update request: "ProviderDetails": { "api_version": "v17.0",  "authorize_scopes": "public_profile, email", "client_id": "1example23456789",  "client_secret": "provider-app-client-secret" }  Describe response: "ProviderDetails":  { "api_version": "v17.0", "attributes_url": "https://graph.facebook.com/v17.0/me?fields=",  "attributes_url_add_attributes": "true", "authorize_scopes": "public_profile, email",  "authorize_url": "https://www.facebook.com/v17.0/dialog/oauth", "client_id":  "1example23456789", "client_secret": "provider-app-client-secret", "token_request_method":  "GET", "token_url": "https://graph.facebook.com/v17.0/oauth/access_token" }
        public let providerDetails: [String: String]?
        /// A friendly name for the IdP.
        public let providerName: String?
        /// The type of IdP. Either SAML, OIDC, or a named social identity provider.
        public let providerType: IdentityProviderTypeType?
        /// The ID of the user pool associated with the IdP.
        public let userPoolId: String?

        @inlinable
        public init(attributeMapping: [String: String]? = nil, creationDate: Date? = nil, idpIdentifiers: [String]? = nil, lastModifiedDate: Date? = nil, providerDetails: [String: String]? = nil, providerName: String? = nil, providerType: IdentityProviderTypeType? = nil, userPoolId: String? = nil) {
            self.attributeMapping = attributeMapping
            self.creationDate = creationDate
            self.idpIdentifiers = idpIdentifiers
            self.lastModifiedDate = lastModifiedDate
            self.providerDetails = providerDetails
            self.providerName = providerName
            self.providerType = providerType
            self.userPoolId = userPoolId
        }

        private enum CodingKeys: String, CodingKey {
            case attributeMapping = "AttributeMapping"
            case creationDate = "CreationDate"
            case idpIdentifiers = "IdpIdentifiers"
            case lastModifiedDate = "LastModifiedDate"
            case providerDetails = "ProviderDetails"
            case providerName = "ProviderName"
            case providerType = "ProviderType"
            case userPoolId = "UserPoolId"
        }
    }

    public struct InitiateAuthRequest: AWSEncodableShape {
        /// Information that supports analytics outcomes with Amazon Pinpoint, including the
        /// user's endpoint ID. The endpoint ID is a destination for Amazon Pinpoint push notifications, for example a device identifier,
        /// email address, or phone number.
        public let analyticsMetadata: AnalyticsMetadataType?
        /// The authentication flow that you want to initiate. Each AuthFlow has linked AuthParameters that you must submit. The following are some example flows.  USER_AUTH  The entry point for choice-based authentication with passwords, one-time passwords, and WebAuthn authenticators. Request a preferred authentication type or review available authentication types. From the offered authentication types, select one in a challenge response and then authenticate with that method in an additional challenge response. To activate this setting, your user pool must be in the  Essentials tier or higher.  USER_SRP_AUTH  Username-password authentication with the Secure Remote Password (SRP) protocol. For more information, see Use SRP password verification in custom authentication flow.  REFRESH_TOKEN_AUTH and REFRESH_TOKEN  Receive new ID and access tokens when you pass a REFRESH_TOKEN parameter with a valid refresh token as the value. For more information, see Using the refresh token.  CUSTOM_AUTH  Custom authentication with Lambda triggers. For more information, see Custom authentication challenge Lambda triggers.  USER_PASSWORD_AUTH  Client-side username-password authentication with the password sent directly in the request. For more information about client-side and server-side authentication, see SDK authorization models.    ADMIN_USER_PASSWORD_AUTH is a flow type of AdminInitiateAuth and isn't valid for InitiateAuth. ADMIN_NO_SRP_AUTH is a legacy server-side username-password flow and isn't valid for InitiateAuth.
        public let authFlow: AuthFlowType
        /// The authentication parameters. These are inputs corresponding to the AuthFlow that you're invoking. The following are some authentication flows and their parameters. Add a SECRET_HASH parameter if your app client has a client secret. Add DEVICE_KEY if you want to bypass multi-factor authentication with a remembered device.   USER_AUTH     USERNAME (required)    PREFERRED_CHALLENGE. If you don't provide a value for PREFERRED_CHALLENGE, Amazon Cognito responds with the AvailableChallenges parameter that specifies the available sign-in methods.    USER_SRP_AUTH     USERNAME (required)    SRP_A (required)    USER_PASSWORD_AUTH     USERNAME (required)    PASSWORD (required)    REFRESH_TOKEN_AUTH/REFRESH_TOKEN     REFRESH_TOKEN(required)    CUSTOM_AUTH     USERNAME (required)    ChallengeName: SRP_A (when doing SRP authentication before custom challenges)    SRP_A: (An SRP_A value) (when doing SRP authentication before custom challenges)     For more information about SECRET_HASH, see Computing secret hash values. For information about DEVICE_KEY, see Working with user devices in your user pool.
        public let authParameters: [String: String]?
        /// The ID of the app client that your user wants to sign in to.
        public let clientId: String
        /// A map of custom key-value pairs that you can provide as input for certain custom workflows that this action triggers. You create custom workflows by assigning Lambda functions to user pool triggers. When you send an InitiateAuth request, Amazon Cognito invokes the Lambda functions that are specified for various triggers. The ClientMetadata value is passed as input to the functions for only the following triggers.   Pre sign-up   Pre authentication   User migration   When Amazon Cognito invokes the functions for these triggers, it passes a JSON payload as input to the function. This payload contains a validationData attribute with the data that you assigned to the ClientMetadata parameter in your InitiateAuth request. In your function, validationData can contribute to operations that require data that isn't in the default payload.  InitiateAuth requests invokes the following triggers without ClientMetadata as input.   Post authentication   Custom message   Pre token generation   Create auth challenge   Define auth challenge   Custom email sender   Custom SMS sender   For more information, see
        /// Using Lambda triggers in the Amazon Cognito Developer Guide.  When you use the ClientMetadata parameter, note that Amazon Cognito won't do the following:   Store the ClientMetadata value. This data is available only to Lambda triggers that are assigned to a user pool to support custom workflows. If your user pool configuration doesn't include triggers, the ClientMetadata parameter serves no purpose.   Validate the ClientMetadata value.   Encrypt the ClientMetadata value. Don't send sensitive information in this parameter.
        public let clientMetadata: [String: String]?
        /// The optional session ID from a ConfirmSignUp API request. You can sign in a user directly from the sign-up process with the USER_AUTH authentication flow. When you pass the session ID to InitiateAuth, Amazon Cognito assumes the SMS or email message one-time verification password from ConfirmSignUp as the primary authentication factor. You're not required to submit this code a second time. This option is only valid for users who have confirmed their sign-up and are signing in for the first time within the authentication flow session duration of the session ID.
        public let session: String?
        /// Contextual data about your user session like the device fingerprint, IP address, or location. Amazon Cognito threat
        /// protection evaluates the risk of an authentication event based on the context that your app generates and passes to Amazon Cognito
        /// when it makes API requests. For more information, see Collecting data for threat protection in
        /// applications.
        public let userContextData: UserContextDataType?

        @inlinable
        public init(analyticsMetadata: AnalyticsMetadataType? = nil, authFlow: AuthFlowType, authParameters: [String: String]? = nil, clientId: String, clientMetadata: [String: String]? = nil, session: String? = nil, userContextData: UserContextDataType? = nil) {
            self.analyticsMetadata = analyticsMetadata
            self.authFlow = authFlow
            self.authParameters = authParameters
            self.clientId = clientId
            self.clientMetadata = clientMetadata
            self.session = session
            self.userContextData = userContextData
        }

        public func validate(name: String) throws {
            try self.analyticsMetadata?.validate(name: "\(name).analyticsMetadata")
            try self.authParameters?.forEach {
                try validate($0.key, name: "authParameters.key", parent: name, max: 131072)
                try validate($0.value, name: "authParameters[\"\($0.key)\"]", parent: name, max: 131072)
            }
            try self.validate(self.clientId, name: "clientId", parent: name, max: 128)
            try self.validate(self.clientId, name: "clientId", parent: name, min: 1)
            try self.validate(self.clientId, name: "clientId", parent: name, pattern: "^[\\w+]+$")
            try self.clientMetadata?.forEach {
                try validate($0.key, name: "clientMetadata.key", parent: name, max: 131072)
                try validate($0.value, name: "clientMetadata[\"\($0.key)\"]", parent: name, max: 131072)
            }
            try self.validate(self.session, name: "session", parent: name, max: 2048)
            try self.validate(self.session, name: "session", parent: name, min: 20)
            try self.userContextData?.validate(name: "\(name).userContextData")
        }

        private enum CodingKeys: String, CodingKey {
            case analyticsMetadata = "AnalyticsMetadata"
            case authFlow = "AuthFlow"
            case authParameters = "AuthParameters"
            case clientId = "ClientId"
            case clientMetadata = "ClientMetadata"
            case session = "Session"
            case userContextData = "UserContextData"
        }
    }

    public struct InitiateAuthResponse: AWSDecodableShape {
        /// The result of a successful and complete authentication request. This result is only returned if the user doesn't need to pass another challenge. If they must pass another challenge before they get tokens, Amazon Cognito returns a challenge in ChallengeName, ChallengeParameters, and Session response parameters.
        public let authenticationResult: AuthenticationResultType?
        /// This response parameter lists the available authentication challenges that users can select from in choice-based authentication. For example, they might be able to choose between passkey authentication, a one-time password from an SMS message, and a traditional password.
        public let availableChallenges: [ChallengeNameType]?
        /// The name of an additional authentication challenge that you must respond to. Possible challenges include the following:  All of the following challenges require USERNAME and, when the app client has a client secret, SECRET_HASH in the parameters. Include a  DEVICE_KEY for device authentication.     WEB_AUTHN: Respond to the challenge with the results of a successful authentication with a WebAuthn authenticator, or passkey, as  CREDENTIAL. Examples of WebAuthn authenticators include  biometric devices and security keys.    PASSWORD: Respond with the user's password as PASSWORD.    PASSWORD_SRP: Respond with the initial SRP secret as SRP_A.    SELECT_CHALLENGE: Respond with a challenge selection as ANSWER.  It must be one of the challenge types in the AvailableChallenges response  parameter. Add the parameters of the selected challenge, for example USERNAME and SMS_OTP.    SMS_MFA: Respond with the code that your user pool delivered in an SMS message, as SMS_MFA_CODE     EMAIL_MFA: Respond with the code that your user pool delivered in an email message, as EMAIL_MFA_CODE     EMAIL_OTP: Respond with the code that your user pool delivered in an email message, as EMAIL_OTP_CODE .    SMS_OTP: Respond with the code that your user pool delivered in an SMS message, as SMS_OTP_CODE.    PASSWORD_VERIFIER: Respond with the second stage of SRP secrets as PASSWORD_CLAIM_SIGNATURE, PASSWORD_CLAIM_SECRET_BLOCK,  and TIMESTAMP.    CUSTOM_CHALLENGE: This is returned if your custom authentication flow determines that the user should pass another challenge before tokens are issued. The parameters of the challenge are determined by your Lambda function and issued in the ChallengeParameters of a challenge response.    DEVICE_SRP_AUTH: Respond with the initial parameters of device SRP  authentication. For more information, see Signing in with a device.    DEVICE_PASSWORD_VERIFIER: Respond with PASSWORD_CLAIM_SIGNATURE, PASSWORD_CLAIM_SECRET_BLOCK, and TIMESTAMP after client-side SRP calculations. For more information, see Signing in with a device.    NEW_PASSWORD_REQUIRED: For users who are required to change their passwords after successful first login. Respond to this challenge with  NEW_PASSWORD and any required attributes that Amazon Cognito returned in  the requiredAttributes parameter. You can also set values for  attributes that aren't required by your user pool and that your app client  can write. Amazon Cognito only returns this challenge for users who have temporary passwords. When you create passwordless users, you must provide values for all required  attributes.  In a NEW_PASSWORD_REQUIRED challenge response, you can't modify a required attribute that already has a value.
        /// In AdminRespondToAuthChallenge or RespondToAuthChallenge, set a value for any keys that Amazon Cognito returned in the
        /// requiredAttributes parameter, then use the AdminUpdateUserAttributes or UpdateUserAttributes API
        /// operation to modify the value of any additional attributes.     MFA_SETUP: For users who are required to setup an MFA factor before they can sign in. The MFA types activated for the user pool will be listed in the challenge parameters MFAS_CAN_SETUP value.  To set up time-based one-time password (TOTP) MFA, use the session returned  in this challenge from InitiateAuth or AdminInitiateAuth  as an input to AssociateSoftwareToken. Then, use the session returned by VerifySoftwareToken as an input to  RespondToAuthChallenge or AdminRespondToAuthChallenge with challenge name MFA_SETUP to complete sign-in.  To set up SMS or email MFA, collect a phone_number or  email attribute for the user. Then restart the authentication  flow with an InitiateAuth or AdminInitiateAuth request.
        public let challengeName: ChallengeNameType?
        /// The required parameters of the ChallengeName challenge. All challenges require USERNAME. They also require SECRET_HASH if your app client has a client secret.
        public let challengeParameters: [String: String]?
        /// The session identifier that links a challenge response to the initial authentication request. If the user must pass another challenge, Amazon Cognito returns a session ID and challenge parameters.
        public let session: String?

        @inlinable
        public init(authenticationResult: AuthenticationResultType? = nil, availableChallenges: [ChallengeNameType]? = nil, challengeName: ChallengeNameType? = nil, challengeParameters: [String: String]? = nil, session: String? = nil) {
            self.authenticationResult = authenticationResult
            self.availableChallenges = availableChallenges
            self.challengeName = challengeName
            self.challengeParameters = challengeParameters
            self.session = session
        }

        private enum CodingKeys: String, CodingKey {
            case authenticationResult = "AuthenticationResult"
            case availableChallenges = "AvailableChallenges"
            case challengeName = "ChallengeName"
            case challengeParameters = "ChallengeParameters"
            case session = "Session"
        }
    }

    public struct InvalidParameterException: AWSErrorShape {
        /// The message returned when the Amazon Cognito service throws an invalid parameter exception.
        public let message: String?
        /// The reason code of the exception.
        public let reasonCode: String?

        @inlinable
        public init(message: String? = nil, reasonCode: String? = nil) {
            self.message = message
            self.reasonCode = reasonCode
        }

        private enum CodingKeys: String, CodingKey {
            case message = "message"
            case reasonCode = "reasonCode"
        }
    }

    public struct LambdaConfigType: AWSEncodableShape & AWSDecodableShape {
        /// The configuration of a create auth challenge Lambda trigger, one of three triggers in the sequence of the custom authentication challenge triggers.
        public let createAuthChallenge: String?
        /// The configuration of a custom email sender Lambda trigger. This trigger routes all email notifications from a user pool to a Lambda function that delivers the message using custom logic.
        public let customEmailSender: CustomEmailLambdaVersionConfigType?
        /// A custom message Lambda trigger. This trigger is an opportunity to customize all SMS and email messages from your user pool. When a custom message trigger is active, your user pool routes all messages to a Lambda function that returns a runtime-customized message subject and body for your user pool to deliver to a user.
        public let customMessage: String?
        /// The configuration of a custom SMS sender Lambda trigger. This trigger routes all SMS notifications from a user pool to a Lambda function that delivers the message using custom logic.
        public let customSMSSender: CustomSMSLambdaVersionConfigType?
        /// The configuration of a define auth challenge Lambda trigger, one of three triggers in the sequence of the custom authentication challenge triggers.
        public let defineAuthChallenge: String?
        /// The ARN of an KMS key. Amazon Cognito uses the key to encrypt codes and temporary passwords sent to custom sender Lambda triggers.
        public let kmsKeyID: String?
        /// The configuration of a post authentication Lambda trigger in a user pool. This trigger can take custom actions after a user signs in.
        public let postAuthentication: String?
        /// The configuration of a post confirmation Lambda trigger in a user pool. This trigger can take custom actions after a user confirms their user account and their email address or phone number.
        public let postConfirmation: String?
        /// The configuration of a pre authentication trigger in a user pool. This trigger can evaluate and modify user sign-in events.
        public let preAuthentication: String?
        /// The configuration of a pre sign-up Lambda trigger in a user pool. This trigger evaluates new users and can bypass confirmation, link a federated user profile, or block sign-up requests.
        public let preSignUp: String?
        /// The legacy configuration of a pre token generation Lambda trigger in a user pool. Set this parameter for legacy purposes. If you also set an ARN in PreTokenGenerationConfig, its value must be identical to PreTokenGeneration. For new instances of pre token generation triggers, set the LambdaArn of PreTokenGenerationConfig.
        public let preTokenGeneration: String?
        /// The detailed configuration of a pre token generation Lambda trigger in a user pool. If you also set an ARN in PreTokenGeneration, its value must be identical to PreTokenGenerationConfig.
        public let preTokenGenerationConfig: PreTokenGenerationVersionConfigType?
        /// The configuration of a migrate user Lambda trigger in a user pool. This trigger can create user profiles when users sign in or attempt to reset their password with credentials that don't exist yet.
        public let userMigration: String?
        /// The configuration of a verify auth challenge Lambda trigger, one of three triggers in the sequence of the custom authentication challenge triggers.
        public let verifyAuthChallengeResponse: String?

        @inlinable
        public init(createAuthChallenge: String? = nil, customEmailSender: CustomEmailLambdaVersionConfigType? = nil, customMessage: String? = nil, customSMSSender: CustomSMSLambdaVersionConfigType? = nil, defineAuthChallenge: String? = nil, kmsKeyID: String? = nil, postAuthentication: String? = nil, postConfirmation: String? = nil, preAuthentication: String? = nil, preSignUp: String? = nil, preTokenGeneration: String? = nil, preTokenGenerationConfig: PreTokenGenerationVersionConfigType? = nil, userMigration: String? = nil, verifyAuthChallengeResponse: String? = nil) {
            self.createAuthChallenge = createAuthChallenge
            self.customEmailSender = customEmailSender
            self.customMessage = customMessage
            self.customSMSSender = customSMSSender
            self.defineAuthChallenge = defineAuthChallenge
            self.kmsKeyID = kmsKeyID
            self.postAuthentication = postAuthentication
            self.postConfirmation = postConfirmation
            self.preAuthentication = preAuthentication
            self.preSignUp = preSignUp
            self.preTokenGeneration = preTokenGeneration
            self.preTokenGenerationConfig = preTokenGenerationConfig
            self.userMigration = userMigration
            self.verifyAuthChallengeResponse = verifyAuthChallengeResponse
        }

        public func validate(name: String) throws {
            try self.validate(self.createAuthChallenge, name: "createAuthChallenge", parent: name, max: 2048)
            try self.validate(self.createAuthChallenge, name: "createAuthChallenge", parent: name, min: 20)
            try self.validate(self.createAuthChallenge, name: "createAuthChallenge", parent: name, pattern: "^arn:[\\w+=/,.@-]+:[\\w+=/,.@-]+:([\\w+=/,.@-]*)?:[0-9]+:[\\w+=/,.@-]+(:[\\w+=/,.@-]+)?(:[\\w+=/,.@-]+)?$")
            try self.customEmailSender?.validate(name: "\(name).customEmailSender")
            try self.validate(self.customMessage, name: "customMessage", parent: name, max: 2048)
            try self.validate(self.customMessage, name: "customMessage", parent: name, min: 20)
            try self.validate(self.customMessage, name: "customMessage", parent: name, pattern: "^arn:[\\w+=/,.@-]+:[\\w+=/,.@-]+:([\\w+=/,.@-]*)?:[0-9]+:[\\w+=/,.@-]+(:[\\w+=/,.@-]+)?(:[\\w+=/,.@-]+)?$")
            try self.customSMSSender?.validate(name: "\(name).customSMSSender")
            try self.validate(self.defineAuthChallenge, name: "defineAuthChallenge", parent: name, max: 2048)
            try self.validate(self.defineAuthChallenge, name: "defineAuthChallenge", parent: name, min: 20)
            try self.validate(self.defineAuthChallenge, name: "defineAuthChallenge", parent: name, pattern: "^arn:[\\w+=/,.@-]+:[\\w+=/,.@-]+:([\\w+=/,.@-]*)?:[0-9]+:[\\w+=/,.@-]+(:[\\w+=/,.@-]+)?(:[\\w+=/,.@-]+)?$")
            try self.validate(self.kmsKeyID, name: "kmsKeyID", parent: name, max: 2048)
            try self.validate(self.kmsKeyID, name: "kmsKeyID", parent: name, min: 20)
            try self.validate(self.kmsKeyID, name: "kmsKeyID", parent: name, pattern: "^arn:[\\w+=/,.@-]+:[\\w+=/,.@-]+:([\\w+=/,.@-]*)?:[0-9]+:[\\w+=/,.@-]+(:[\\w+=/,.@-]+)?(:[\\w+=/,.@-]+)?$")
            try self.validate(self.postAuthentication, name: "postAuthentication", parent: name, max: 2048)
            try self.validate(self.postAuthentication, name: "postAuthentication", parent: name, min: 20)
            try self.validate(self.postAuthentication, name: "postAuthentication", parent: name, pattern: "^arn:[\\w+=/,.@-]+:[\\w+=/,.@-]+:([\\w+=/,.@-]*)?:[0-9]+:[\\w+=/,.@-]+(:[\\w+=/,.@-]+)?(:[\\w+=/,.@-]+)?$")
            try self.validate(self.postConfirmation, name: "postConfirmation", parent: name, max: 2048)
            try self.validate(self.postConfirmation, name: "postConfirmation", parent: name, min: 20)
            try self.validate(self.postConfirmation, name: "postConfirmation", parent: name, pattern: "^arn:[\\w+=/,.@-]+:[\\w+=/,.@-]+:([\\w+=/,.@-]*)?:[0-9]+:[\\w+=/,.@-]+(:[\\w+=/,.@-]+)?(:[\\w+=/,.@-]+)?$")
            try self.validate(self.preAuthentication, name: "preAuthentication", parent: name, max: 2048)
            try self.validate(self.preAuthentication, name: "preAuthentication", parent: name, min: 20)
            try self.validate(self.preAuthentication, name: "preAuthentication", parent: name, pattern: "^arn:[\\w+=/,.@-]+:[\\w+=/,.@-]+:([\\w+=/,.@-]*)?:[0-9]+:[\\w+=/,.@-]+(:[\\w+=/,.@-]+)?(:[\\w+=/,.@-]+)?$")
            try self.validate(self.preSignUp, name: "preSignUp", parent: name, max: 2048)
            try self.validate(self.preSignUp, name: "preSignUp", parent: name, min: 20)
            try self.validate(self.preSignUp, name: "preSignUp", parent: name, pattern: "^arn:[\\w+=/,.@-]+:[\\w+=/,.@-]+:([\\w+=/,.@-]*)?:[0-9]+:[\\w+=/,.@-]+(:[\\w+=/,.@-]+)?(:[\\w+=/,.@-]+)?$")
            try self.validate(self.preTokenGeneration, name: "preTokenGeneration", parent: name, max: 2048)
            try self.validate(self.preTokenGeneration, name: "preTokenGeneration", parent: name, min: 20)
            try self.validate(self.preTokenGeneration, name: "preTokenGeneration", parent: name, pattern: "^arn:[\\w+=/,.@-]+:[\\w+=/,.@-]+:([\\w+=/,.@-]*)?:[0-9]+:[\\w+=/,.@-]+(:[\\w+=/,.@-]+)?(:[\\w+=/,.@-]+)?$")
            try self.preTokenGenerationConfig?.validate(name: "\(name).preTokenGenerationConfig")
            try self.validate(self.userMigration, name: "userMigration", parent: name, max: 2048)
            try self.validate(self.userMigration, name: "userMigration", parent: name, min: 20)
            try self.validate(self.userMigration, name: "userMigration", parent: name, pattern: "^arn:[\\w+=/,.@-]+:[\\w+=/,.@-]+:([\\w+=/,.@-]*)?:[0-9]+:[\\w+=/,.@-]+(:[\\w+=/,.@-]+)?(:[\\w+=/,.@-]+)?$")
            try self.validate(self.verifyAuthChallengeResponse, name: "verifyAuthChallengeResponse", parent: name, max: 2048)
            try self.validate(self.verifyAuthChallengeResponse, name: "verifyAuthChallengeResponse", parent: name, min: 20)
            try self.validate(self.verifyAuthChallengeResponse, name: "verifyAuthChallengeResponse", parent: name, pattern: "^arn:[\\w+=/,.@-]+:[\\w+=/,.@-]+:([\\w+=/,.@-]*)?:[0-9]+:[\\w+=/,.@-]+(:[\\w+=/,.@-]+)?(:[\\w+=/,.@-]+)?$")
        }

        private enum CodingKeys: String, CodingKey {
            case createAuthChallenge = "CreateAuthChallenge"
            case customEmailSender = "CustomEmailSender"
            case customMessage = "CustomMessage"
            case customSMSSender = "CustomSMSSender"
            case defineAuthChallenge = "DefineAuthChallenge"
            case kmsKeyID = "KMSKeyID"
            case postAuthentication = "PostAuthentication"
            case postConfirmation = "PostConfirmation"
            case preAuthentication = "PreAuthentication"
            case preSignUp = "PreSignUp"
            case preTokenGeneration = "PreTokenGeneration"
            case preTokenGenerationConfig = "PreTokenGenerationConfig"
            case userMigration = "UserMigration"
            case verifyAuthChallengeResponse = "VerifyAuthChallengeResponse"
        }
    }

    public struct ListDevicesRequest: AWSEncodableShape {
        /// A valid access token that Amazon Cognito issued to the currently signed-in user. Must include a scope claim for
        /// aws.cognito.signin.user.admin.
        public let accessToken: String
        /// The maximum number of devices that you want Amazon Cognito to return in the response.
        public let limit: Int?
        /// This API operation returns a limited number of results. The pagination token is
        /// an identifier that you can present in an additional API request with the same parameters. When
        /// you include the pagination token, Amazon Cognito returns the next set of items after the current list.
        /// Subsequent requests return a new pagination token. By use of this token, you can paginate
        /// through the full list of items.
        public let paginationToken: String?

        @inlinable
        public init(accessToken: String, limit: Int? = nil, paginationToken: String? = nil) {
            self.accessToken = accessToken
            self.limit = limit
            self.paginationToken = paginationToken
        }

        public func validate(name: String) throws {
            try self.validate(self.accessToken, name: "accessToken", parent: name, pattern: "^[A-Za-z0-9-_=.]+$")
            try self.validate(self.limit, name: "limit", parent: name, max: 60)
            try self.validate(self.limit, name: "limit", parent: name, min: 0)
            try self.validate(self.paginationToken, name: "paginationToken", parent: name, min: 1)
            try self.validate(self.paginationToken, name: "paginationToken", parent: name, pattern: "^[\\S]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case accessToken = "AccessToken"
            case limit = "Limit"
            case paginationToken = "PaginationToken"
        }
    }

    public struct ListDevicesResponse: AWSDecodableShape {
        /// An array of devices and their details. Each entry that's returned includes device information, last-accessed and created dates, and the device key.
        public let devices: [DeviceType]?
        /// The identifier that Amazon Cognito returned with the previous request to this operation. When
        /// you include a pagination token in your request, Amazon Cognito returns the next set of items in
        /// the list. By use of this token, you can paginate through the full list of items.
        public let paginationToken: String?

        @inlinable
        public init(devices: [DeviceType]? = nil, paginationToken: String? = nil) {
            self.devices = devices
            self.paginationToken = paginationToken
        }

        private enum CodingKeys: String, CodingKey {
            case devices = "Devices"
            case paginationToken = "PaginationToken"
        }
    }

    public struct ListGroupsRequest: AWSEncodableShape {
        /// The maximum number of groups that you want Amazon Cognito to return in the response.
        public let limit: Int?
        /// This API operation returns a limited number of results. The pagination token is
        /// an identifier that you can present in an additional API request with the same parameters. When
        /// you include the pagination token, Amazon Cognito returns the next set of items after the current list.
        /// Subsequent requests return a new pagination token. By use of this token, you can paginate
        /// through the full list of items.
        public let nextToken: String?
        /// The ID of the user pool where you want to list user groups.
        public let userPoolId: String

        @inlinable
        public init(limit: Int? = nil, nextToken: String? = nil, userPoolId: String) {
            self.limit = limit
            self.nextToken = nextToken
            self.userPoolId = userPoolId
        }

        public func validate(name: String) throws {
            try self.validate(self.limit, name: "limit", parent: name, max: 60)
            try self.validate(self.limit, name: "limit", parent: name, min: 0)
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 131072)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, pattern: "^[\\S]+$")
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, max: 55)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, min: 1)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, pattern: "^[\\w-]+_[0-9a-zA-Z]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case limit = "Limit"
            case nextToken = "NextToken"
            case userPoolId = "UserPoolId"
        }
    }

    public struct ListGroupsResponse: AWSDecodableShape {
        /// An array of groups and their details. Each entry that's returned includes description, precedence, and IAM role values.
        public let groups: [GroupType]?
        /// The identifier that Amazon Cognito returned with the previous request to this operation. When
        /// you include a pagination token in your request, Amazon Cognito returns the next set of items in
        /// the list. By use of this token, you can paginate through the full list of items.
        public let nextToken: String?

        @inlinable
        public init(groups: [GroupType]? = nil, nextToken: String? = nil) {
            self.groups = groups
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case groups = "Groups"
            case nextToken = "NextToken"
        }
    }

    public struct ListIdentityProvidersRequest: AWSEncodableShape {
        /// The maximum number of IdPs that you want Amazon Cognito to return in the response.
        public let maxResults: Int?
        /// This API operation returns a limited number of results. The pagination token is
        /// an identifier that you can present in an additional API request with the same parameters. When
        /// you include the pagination token, Amazon Cognito returns the next set of items after the current list.
        /// Subsequent requests return a new pagination token. By use of this token, you can paginate
        /// through the full list of items.
        public let nextToken: String?
        /// The ID of the user pool where you want to list IdPs.
        public let userPoolId: String

        @inlinable
        public init(maxResults: Int? = nil, nextToken: String? = nil, userPoolId: String) {
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.userPoolId = userPoolId
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 60)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 0)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, pattern: "^[\\S]+$")
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, max: 55)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, min: 1)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, pattern: "^[\\w-]+_[0-9a-zA-Z]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
            case userPoolId = "UserPoolId"
        }
    }

    public struct ListIdentityProvidersResponse: AWSDecodableShape {
        /// The identifier that Amazon Cognito returned with the previous request to this operation. When
        /// you include a pagination token in your request, Amazon Cognito returns the next set of items in
        /// the list. By use of this token, you can paginate through the full list of items.
        public let nextToken: String?
        /// An array of the IdPs in your user pool. For each, the response includes identifiers, the IdP name and type, and trust-relationship details like the issuer URL.
        public let providers: [ProviderDescription]

        @inlinable
        public init(nextToken: String? = nil, providers: [ProviderDescription]) {
            self.nextToken = nextToken
            self.providers = providers
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "NextToken"
            case providers = "Providers"
        }
    }

    public struct ListResourceServersRequest: AWSEncodableShape {
        /// The maximum number of resource servers that you want Amazon Cognito to return in the response.
        public let maxResults: Int?
        /// This API operation returns a limited number of results. The pagination token is
        /// an identifier that you can present in an additional API request with the same parameters. When
        /// you include the pagination token, Amazon Cognito returns the next set of items after the current list.
        /// Subsequent requests return a new pagination token. By use of this token, you can paginate
        /// through the full list of items.
        public let nextToken: String?
        /// The ID of the user pool where you want to list resource servers.
        public let userPoolId: String

        @inlinable
        public init(maxResults: Int? = nil, nextToken: String? = nil, userPoolId: String) {
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.userPoolId = userPoolId
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 50)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, pattern: "^[\\S]+$")
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, max: 55)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, min: 1)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, pattern: "^[\\w-]+_[0-9a-zA-Z]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
            case userPoolId = "UserPoolId"
        }
    }

    public struct ListResourceServersResponse: AWSDecodableShape {
        /// The identifier that Amazon Cognito returned with the previous request to this operation. When
        /// you include a pagination token in your request, Amazon Cognito returns the next set of items in
        /// the list. By use of this token, you can paginate through the full list of items.
        public let nextToken: String?
        /// An array of resource servers and the details of their configuration. For each, the response includes names, identifiers, and custom scopes.
        public let resourceServers: [ResourceServerType]

        @inlinable
        public init(nextToken: String? = nil, resourceServers: [ResourceServerType]) {
            self.nextToken = nextToken
            self.resourceServers = resourceServers
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "NextToken"
            case resourceServers = "ResourceServers"
        }
    }

    public struct ListTagsForResourceRequest: AWSEncodableShape {
        /// The Amazon Resource Name (ARN) of the user pool that the tags are assigned to.
        public let resourceArn: String

        @inlinable
        public init(resourceArn: String) {
            self.resourceArn = resourceArn
        }

        public func validate(name: String) throws {
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, max: 2048)
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, min: 20)
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, pattern: "^arn:[\\w+=/,.@-]+:[\\w+=/,.@-]+:([\\w+=/,.@-]*)?:[0-9]+:[\\w+=/,.@-]+(:[\\w+=/,.@-]+)?(:[\\w+=/,.@-]+)?$")
        }

        private enum CodingKeys: String, CodingKey {
            case resourceArn = "ResourceArn"
        }
    }

    public struct ListTagsForResourceResponse: AWSDecodableShape {
        /// The tags that are assigned to the user pool.
        public let tags: [String: String]?

        @inlinable
        public init(tags: [String: String]? = nil) {
            self.tags = tags
        }

        private enum CodingKeys: String, CodingKey {
            case tags = "Tags"
        }
    }

    public struct ListTermsRequest: AWSEncodableShape {
        /// The maximum number of terms documents that you want Amazon Cognito to return in the response.
        public let maxResults: Int?
        /// This API operation returns a limited number of results. The pagination token is
        /// an identifier that you can present in an additional API request with the same parameters. When
        /// you include the pagination token, Amazon Cognito returns the next set of items after the current list.
        /// Subsequent requests return a new pagination token. By use of this token, you can paginate
        /// through the full list of items.
        public let nextToken: String?
        /// The ID of the user pool where you want to list terms documents.
        public let userPoolId: String

        @inlinable
        public init(maxResults: Int? = nil, nextToken: String? = nil, userPoolId: String) {
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.userPoolId = userPoolId
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 60)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 131072)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, max: 55)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, min: 1)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, pattern: "^[\\w-]+_[0-9a-zA-Z]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
            case userPoolId = "UserPoolId"
        }
    }

    public struct ListTermsResponse: AWSDecodableShape {
        /// This API operation returns a limited number of results. The pagination token is
        /// an identifier that you can present in an additional API request with the same parameters. When
        /// you include the pagination token, Amazon Cognito returns the next set of items after the current list.
        /// Subsequent requests return a new pagination token. By use of this token, you can paginate
        /// through the full list of items.
        public let nextToken: String?
        /// A summary of the requested terms documents. Includes unique identifiers for later changes to the terms documents.
        public let terms: [TermsDescriptionType]

        @inlinable
        public init(nextToken: String? = nil, terms: [TermsDescriptionType]) {
            self.nextToken = nextToken
            self.terms = terms
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "NextToken"
            case terms = "Terms"
        }
    }

    public struct ListUserImportJobsRequest: AWSEncodableShape {
        /// The maximum number of import jobs that you want Amazon Cognito to return in the response.
        public let maxResults: Int
        /// This API operation returns a limited number of results. The pagination token is
        /// an identifier that you can present in an additional API request with the same parameters. When
        /// you include the pagination token, Amazon Cognito returns the next set of items after the current list.
        /// Subsequent requests return a new pagination token. By use of this token, you can paginate
        /// through the full list of items.
        public let paginationToken: String?
        /// The ID of the user pool where you want to list import jobs.
        public let userPoolId: String

        @inlinable
        public init(maxResults: Int, paginationToken: String? = nil, userPoolId: String) {
            self.maxResults = maxResults
            self.paginationToken = paginationToken
            self.userPoolId = userPoolId
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 60)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.paginationToken, name: "paginationToken", parent: name, min: 1)
            try self.validate(self.paginationToken, name: "paginationToken", parent: name, pattern: "^[\\S]+$")
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, max: 55)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, min: 1)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, pattern: "^[\\w-]+_[0-9a-zA-Z]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case maxResults = "MaxResults"
            case paginationToken = "PaginationToken"
            case userPoolId = "UserPoolId"
        }
    }

    public struct ListUserImportJobsResponse: AWSDecodableShape {
        /// The identifier that Amazon Cognito returned with the previous request to this operation. When
        /// you include a pagination token in your request, Amazon Cognito returns the next set of items in
        /// the list. By use of this token, you can paginate through the full list of items.
        public let paginationToken: String?
        /// An array of user import jobs from the requested user pool. For each, the response includes logging destination, status, and the Amazon S3 pre-signed URL for CSV upload.
        public let userImportJobs: [UserImportJobType]?

        @inlinable
        public init(paginationToken: String? = nil, userImportJobs: [UserImportJobType]? = nil) {
            self.paginationToken = paginationToken
            self.userImportJobs = userImportJobs
        }

        private enum CodingKeys: String, CodingKey {
            case paginationToken = "PaginationToken"
            case userImportJobs = "UserImportJobs"
        }
    }

    public struct ListUserPoolClientsRequest: AWSEncodableShape {
        /// The maximum number of app clients that you want Amazon Cognito to return in the response.
        public let maxResults: Int?
        /// This API operation returns a limited number of results. The pagination token is
        /// an identifier that you can present in an additional API request with the same parameters. When
        /// you include the pagination token, Amazon Cognito returns the next set of items after the current list.
        /// Subsequent requests return a new pagination token. By use of this token, you can paginate
        /// through the full list of items.
        public let nextToken: String?
        /// The ID of the user pool where you want to list user pool clients.
        public let userPoolId: String

        @inlinable
        public init(maxResults: Int? = nil, nextToken: String? = nil, userPoolId: String) {
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.userPoolId = userPoolId
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 60)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 131072)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, pattern: "^[\\S]+$")
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, max: 55)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, min: 1)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, pattern: "^[\\w-]+_[0-9a-zA-Z]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
            case userPoolId = "UserPoolId"
        }
    }

    public struct ListUserPoolClientsResponse: AWSDecodableShape {
        /// The identifier that Amazon Cognito returned with the previous request to this operation. When
        /// you include a pagination token in your request, Amazon Cognito returns the next set of items in
        /// the list. By use of this token, you can paginate through the full list of items.
        public let nextToken: String?
        /// An array of app clients and their details. Includes app client ID and name.
        public let userPoolClients: [UserPoolClientDescription]?

        @inlinable
        public init(nextToken: String? = nil, userPoolClients: [UserPoolClientDescription]? = nil) {
            self.nextToken = nextToken
            self.userPoolClients = userPoolClients
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "NextToken"
            case userPoolClients = "UserPoolClients"
        }
    }

    public struct ListUserPoolsRequest: AWSEncodableShape {
        /// The maximum number of user pools that you want Amazon Cognito to return in the response.
        public let maxResults: Int
        /// This API operation returns a limited number of results. The pagination token is
        /// an identifier that you can present in an additional API request with the same parameters. When
        /// you include the pagination token, Amazon Cognito returns the next set of items after the current list.
        /// Subsequent requests return a new pagination token. By use of this token, you can paginate
        /// through the full list of items.
        public let nextToken: String?

        @inlinable
        public init(maxResults: Int, nextToken: String? = nil) {
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 60)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, pattern: "^[\\S]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
        }
    }

    public struct ListUserPoolsResponse: AWSDecodableShape {
        /// The identifier that Amazon Cognito returned with the previous request to this operation. When
        /// you include a pagination token in your request, Amazon Cognito returns the next set of items in
        /// the list. By use of this token, you can paginate through the full list of items.
        public let nextToken: String?
        /// An array of user pools and their configuration details.
        public let userPools: [UserPoolDescriptionType]?

        @inlinable
        public init(nextToken: String? = nil, userPools: [UserPoolDescriptionType]? = nil) {
            self.nextToken = nextToken
            self.userPools = userPools
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "NextToken"
            case userPools = "UserPools"
        }
    }

    public struct ListUsersInGroupRequest: AWSEncodableShape {
        /// The name of the group that you want to query for user membership.
        public let groupName: String
        /// The maximum number of groups that you want Amazon Cognito to return in the response.
        public let limit: Int?
        /// This API operation returns a limited number of results. The pagination token is
        /// an identifier that you can present in an additional API request with the same parameters. When
        /// you include the pagination token, Amazon Cognito returns the next set of items after the current list.
        /// Subsequent requests return a new pagination token. By use of this token, you can paginate
        /// through the full list of items.
        public let nextToken: String?
        /// The ID of the user pool where you want to view the membership of the requested group.
        public let userPoolId: String

        @inlinable
        public init(groupName: String, limit: Int? = nil, nextToken: String? = nil, userPoolId: String) {
            self.groupName = groupName
            self.limit = limit
            self.nextToken = nextToken
            self.userPoolId = userPoolId
        }

        public func validate(name: String) throws {
            try self.validate(self.groupName, name: "groupName", parent: name, max: 128)
            try self.validate(self.groupName, name: "groupName", parent: name, min: 1)
            try self.validate(self.groupName, name: "groupName", parent: name, pattern: "^[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}]+$")
            try self.validate(self.limit, name: "limit", parent: name, max: 60)
            try self.validate(self.limit, name: "limit", parent: name, min: 0)
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 131072)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, pattern: "^[\\S]+$")
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, max: 55)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, min: 1)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, pattern: "^[\\w-]+_[0-9a-zA-Z]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case groupName = "GroupName"
            case limit = "Limit"
            case nextToken = "NextToken"
            case userPoolId = "UserPoolId"
        }
    }

    public struct ListUsersInGroupResponse: AWSDecodableShape {
        /// The identifier that Amazon Cognito returned with the previous request to this operation. When
        /// you include a pagination token in your request, Amazon Cognito returns the next set of items in
        /// the list. By use of this token, you can paginate through the full list of items.
        public let nextToken: String?
        /// An array of users who are members in the group, and their attributes.
        public let users: [UserType]?

        @inlinable
        public init(nextToken: String? = nil, users: [UserType]? = nil) {
            self.nextToken = nextToken
            self.users = users
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "NextToken"
            case users = "Users"
        }
    }

    public struct ListUsersRequest: AWSEncodableShape {
        /// A JSON array of user attribute names, for example given_name, that you want Amazon Cognito to include in the response for each user. When you don't provide an AttributesToGet parameter, Amazon Cognito returns all attributes for each user. Use AttributesToGet with required attributes in your user pool, or in conjunction with Filter. Amazon Cognito returns an error if not all users in the results have set a value for the attribute you request. Attributes that you can't filter on, including custom attributes, must have a value set in every user profile before an AttributesToGet parameter returns results.
        public let attributesToGet: [String]?
        /// A filter string of the form "AttributeName Filter-Type "AttributeValue". Quotation marks within the filter string must be escaped using the backslash (\) character. For example, "family_name = \"Reddy\"".    AttributeName: The name of the attribute to search for. You can only search for one attribute at a time.    Filter-Type: For an exact match, use =, for example, "given_name = \"Jon\"". For a prefix ("starts with") match, use ^=, for example, "given_name ^= \"Jon\"".     AttributeValue: The attribute value that must be matched for each user.   If the filter string is empty, ListUsers returns all users in the user pool. You can only search for the following standard attributes:    username (case-sensitive)    email     phone_number     name     given_name     family_name     preferred_username     cognito:user_status (called Status in the Console) (case-insensitive)    status (called Enabled in the Console) (case-sensitive)     sub    Custom attributes aren't searchable.  You can also list users with a client-side filter. The server-side filter matches no more than one attribute. For an advanced search, use a client-side filter with the --query parameter of the list-users action in the CLI. When you use a client-side filter, ListUsers returns a paginated list of zero or more users. You can receive multiple pages in a row with zero results. Repeat the query with each pagination token that is returned until you receive a null pagination token value, and then review the combined result.  For more information about server-side and client-side filtering, see FilteringCLI output in the Command Line Interface User Guide.   For more information, see Searching for Users Using the ListUsers API and Examples of Using the ListUsers API in the Amazon Cognito Developer Guide.
        public let filter: String?
        /// The maximum number of users that you want Amazon Cognito to return in the response.
        public let limit: Int?
        /// This API operation returns a limited number of results. The pagination token is
        /// an identifier that you can present in an additional API request with the same parameters. When
        /// you include the pagination token, Amazon Cognito returns the next set of items after the current list.
        /// Subsequent requests return a new pagination token. By use of this token, you can paginate
        /// through the full list of items.
        public let paginationToken: String?
        /// The ID of the user pool where you want to display or search for users.
        public let userPoolId: String

        @inlinable
        public init(attributesToGet: [String]? = nil, filter: String? = nil, limit: Int? = nil, paginationToken: String? = nil, userPoolId: String) {
            self.attributesToGet = attributesToGet
            self.filter = filter
            self.limit = limit
            self.paginationToken = paginationToken
            self.userPoolId = userPoolId
        }

        public func validate(name: String) throws {
            try self.attributesToGet?.forEach {
                try validate($0, name: "attributesToGet[]", parent: name, max: 32)
                try validate($0, name: "attributesToGet[]", parent: name, min: 1)
                try validate($0, name: "attributesToGet[]", parent: name, pattern: "^[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}]+$")
            }
            try self.validate(self.filter, name: "filter", parent: name, max: 256)
            try self.validate(self.limit, name: "limit", parent: name, max: 60)
            try self.validate(self.limit, name: "limit", parent: name, min: 0)
            try self.validate(self.paginationToken, name: "paginationToken", parent: name, min: 1)
            try self.validate(self.paginationToken, name: "paginationToken", parent: name, pattern: "^[\\S]+$")
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, max: 55)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, min: 1)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, pattern: "^[\\w-]+_[0-9a-zA-Z]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case attributesToGet = "AttributesToGet"
            case filter = "Filter"
            case limit = "Limit"
            case paginationToken = "PaginationToken"
            case userPoolId = "UserPoolId"
        }
    }

    public struct ListUsersResponse: AWSDecodableShape {
        /// The identifier that Amazon Cognito returned with the previous request to this operation. When
        /// you include a pagination token in your request, Amazon Cognito returns the next set of items in
        /// the list. By use of this token, you can paginate through the full list of items.
        public let paginationToken: String?
        /// An array of user pool users who match your query, and their attributes.
        public let users: [UserType]?

        @inlinable
        public init(paginationToken: String? = nil, users: [UserType]? = nil) {
            self.paginationToken = paginationToken
            self.users = users
        }

        private enum CodingKeys: String, CodingKey {
            case paginationToken = "PaginationToken"
            case users = "Users"
        }
    }

    public struct ListWebAuthnCredentialsRequest: AWSEncodableShape {
        /// A valid access token that Amazon Cognito issued to the currently signed-in user. Must include a scope claim for
        /// aws.cognito.signin.user.admin.
        public let accessToken: String
        /// The maximum number of the user's passkey credentials that you want to return.
        public let maxResults: Int?
        /// This API operation returns a limited number of results. The pagination token is
        /// an identifier that you can present in an additional API request with the same parameters. When
        /// you include the pagination token, Amazon Cognito returns the next set of items after the current list.
        /// Subsequent requests return a new pagination token. By use of this token, you can paginate
        /// through the full list of items.
        public let nextToken: String?

        @inlinable
        public init(accessToken: String, maxResults: Int? = nil, nextToken: String? = nil) {
            self.accessToken = accessToken
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.validate(self.accessToken, name: "accessToken", parent: name, pattern: "^[A-Za-z0-9-_=.]+$")
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 20)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 0)
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 131072)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, pattern: "^[\\S]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case accessToken = "AccessToken"
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
        }
    }

    public struct ListWebAuthnCredentialsResponse: AWSDecodableShape {
        /// A list of registered passkeys for a user.
        public let credentials: [WebAuthnCredentialDescription]
        /// The identifier that Amazon Cognito returned with the previous request to this operation. When
        /// you include a pagination token in your request, Amazon Cognito returns the next set of items in
        /// the list. By use of this token, you can paginate through the full list of items.
        public let nextToken: String?

        @inlinable
        public init(credentials: [WebAuthnCredentialDescription], nextToken: String? = nil) {
            self.credentials = credentials
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case credentials = "Credentials"
            case nextToken = "NextToken"
        }
    }

    public struct LogConfigurationType: AWSEncodableShape & AWSDecodableShape {
        /// The CloudWatch log group destination of user pool detailed activity logs, or of user activity log export with threat protection.
        public let cloudWatchLogsConfiguration: CloudWatchLogsConfigurationType?
        /// The source of events that your user pool sends for logging. To send error-level logs about user notification activity, set to userNotification. To send info-level logs about threat-protection user activity in user pools with the Plus feature plan, set to userAuthEvents.
        public let eventSource: EventSourceName
        /// The Amazon Data Firehose stream destination of user activity log export with threat protection. To activate this setting, your user pool must be on the  Plus tier.
        public let firehoseConfiguration: FirehoseConfigurationType?
        /// The errorlevel selection of logs that a user pool sends for detailed activity logging. To send userNotification activity with information about message delivery, choose ERROR with CloudWatchLogsConfiguration. To send userAuthEvents activity with user logs from threat protection with the Plus feature plan, choose INFO with one of CloudWatchLogsConfiguration, FirehoseConfiguration, or S3Configuration.
        public let logLevel: LogLevel
        /// The Amazon S3 bucket destination of user activity log export with threat protection. To activate this setting, your user pool must be on the  Plus tier.
        public let s3Configuration: S3ConfigurationType?

        @inlinable
        public init(cloudWatchLogsConfiguration: CloudWatchLogsConfigurationType? = nil, eventSource: EventSourceName, firehoseConfiguration: FirehoseConfigurationType? = nil, logLevel: LogLevel, s3Configuration: S3ConfigurationType? = nil) {
            self.cloudWatchLogsConfiguration = cloudWatchLogsConfiguration
            self.eventSource = eventSource
            self.firehoseConfiguration = firehoseConfiguration
            self.logLevel = logLevel
            self.s3Configuration = s3Configuration
        }

        public func validate(name: String) throws {
            try self.cloudWatchLogsConfiguration?.validate(name: "\(name).cloudWatchLogsConfiguration")
            try self.firehoseConfiguration?.validate(name: "\(name).firehoseConfiguration")
            try self.s3Configuration?.validate(name: "\(name).s3Configuration")
        }

        private enum CodingKeys: String, CodingKey {
            case cloudWatchLogsConfiguration = "CloudWatchLogsConfiguration"
            case eventSource = "EventSource"
            case firehoseConfiguration = "FirehoseConfiguration"
            case logLevel = "LogLevel"
            case s3Configuration = "S3Configuration"
        }
    }

    public struct LogDeliveryConfigurationType: AWSDecodableShape {
        /// A logging destination of a user pool. User pools can have multiple logging destinations for message-delivery and user-activity logs.
        public let logConfigurations: [LogConfigurationType]
        /// The ID of the user pool where you configured logging.
        public let userPoolId: String

        @inlinable
        public init(logConfigurations: [LogConfigurationType], userPoolId: String) {
            self.logConfigurations = logConfigurations
            self.userPoolId = userPoolId
        }

        private enum CodingKeys: String, CodingKey {
            case logConfigurations = "LogConfigurations"
            case userPoolId = "UserPoolId"
        }
    }

    public struct MFAOptionType: AWSEncodableShape & AWSDecodableShape {
        /// The attribute name of the MFA option type. The only valid value is phone_number.
        public let attributeName: String?
        /// The delivery medium to send the MFA code. You can use this parameter to set only the SMS delivery medium value.
        public let deliveryMedium: DeliveryMediumType?

        @inlinable
        public init(attributeName: String? = nil, deliveryMedium: DeliveryMediumType? = nil) {
            self.attributeName = attributeName
            self.deliveryMedium = deliveryMedium
        }

        public func validate(name: String) throws {
            try self.validate(self.attributeName, name: "attributeName", parent: name, max: 32)
            try self.validate(self.attributeName, name: "attributeName", parent: name, min: 1)
            try self.validate(self.attributeName, name: "attributeName", parent: name, pattern: "^[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case attributeName = "AttributeName"
            case deliveryMedium = "DeliveryMedium"
        }
    }

    public struct ManagedLoginBrandingType: AWSDecodableShape {
        /// An array of image files that you want to apply to roles like backgrounds, logos, and icons. Each object must also indicate whether it is for dark mode, light mode, or browser-adaptive mode.
        public let assets: [AssetType]?
        /// The date and time when the item was created. Amazon Cognito returns this timestamp in UNIX epoch time format. Your SDK might render the output in a
        /// human-readable format like ISO 8601 or a Java Date object.
        public let creationDate: Date?
        /// The date and time when the item was modified. Amazon Cognito returns this timestamp in UNIX epoch time format. Your SDK might render the output in a
        /// human-readable format like ISO 8601 or a Java Date object.
        public let lastModifiedDate: Date?
        /// The ID of the managed login branding style.
        public let managedLoginBrandingId: String?
        /// A JSON file, encoded as a Document type, with the the settings that you want to apply to your style. The following components are not currently implemented and reserved for future use:    signUp     instructions     sessionTimerDisplay     languageSelector (for localization, see Managed login localization)
        public let settings: AWSDocument?
        /// When true, applies the default branding style options. This option reverts to default style options that are managed by Amazon Cognito. You can modify them later in the branding editor. When you specify true for this option, you must also omit values for Settings and Assets in the request.
        public let useCognitoProvidedValues: Bool?
        /// The user pool where the branding style is assigned.
        public let userPoolId: String?

        @inlinable
        public init(assets: [AssetType]? = nil, creationDate: Date? = nil, lastModifiedDate: Date? = nil, managedLoginBrandingId: String? = nil, settings: AWSDocument? = nil, useCognitoProvidedValues: Bool? = nil, userPoolId: String? = nil) {
            self.assets = assets
            self.creationDate = creationDate
            self.lastModifiedDate = lastModifiedDate
            self.managedLoginBrandingId = managedLoginBrandingId
            self.settings = settings
            self.useCognitoProvidedValues = useCognitoProvidedValues
            self.userPoolId = userPoolId
        }

        private enum CodingKeys: String, CodingKey {
            case assets = "Assets"
            case creationDate = "CreationDate"
            case lastModifiedDate = "LastModifiedDate"
            case managedLoginBrandingId = "ManagedLoginBrandingId"
            case settings = "Settings"
            case useCognitoProvidedValues = "UseCognitoProvidedValues"
            case userPoolId = "UserPoolId"
        }
    }

    public struct MessageTemplateType: AWSEncodableShape & AWSDecodableShape {
        /// The message template for email messages. EmailMessage is allowed only if EmailSendingAccount is DEVELOPER.
        public let emailMessage: String?
        /// The subject line for email messages. EmailSubject is allowed only if EmailSendingAccount is DEVELOPER.
        public let emailSubject: String?
        /// The message template for SMS messages.
        public let smsMessage: String?

        @inlinable
        public init(emailMessage: String? = nil, emailSubject: String? = nil, smsMessage: String? = nil) {
            self.emailMessage = emailMessage
            self.emailSubject = emailSubject
            self.smsMessage = smsMessage
        }

        public func validate(name: String) throws {
            try self.validate(self.emailMessage, name: "emailMessage", parent: name, max: 20000)
            try self.validate(self.emailMessage, name: "emailMessage", parent: name, min: 6)
            try self.validate(self.emailMessage, name: "emailMessage", parent: name, pattern: "^[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}\\s*]*$")
            try self.validate(self.emailSubject, name: "emailSubject", parent: name, max: 140)
            try self.validate(self.emailSubject, name: "emailSubject", parent: name, min: 1)
            try self.validate(self.emailSubject, name: "emailSubject", parent: name, pattern: "^[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}\\s]+$")
            try self.validate(self.smsMessage, name: "smsMessage", parent: name, max: 140)
            try self.validate(self.smsMessage, name: "smsMessage", parent: name, min: 6)
            try self.validate(self.smsMessage, name: "smsMessage", parent: name, pattern: "^(?s)")
        }

        private enum CodingKeys: String, CodingKey {
            case emailMessage = "EmailMessage"
            case emailSubject = "EmailSubject"
            case smsMessage = "SMSMessage"
        }
    }

    public struct NewDeviceMetadataType: AWSDecodableShape {
        /// The device group key, an identifier used in generating the DEVICE_PASSWORD_VERIFIER for device SRP authentication.
        public let deviceGroupKey: String?
        /// The device key, an identifier used in generating the DEVICE_PASSWORD_VERIFIER for device SRP authentication.
        public let deviceKey: String?

        @inlinable
        public init(deviceGroupKey: String? = nil, deviceKey: String? = nil) {
            self.deviceGroupKey = deviceGroupKey
            self.deviceKey = deviceKey
        }

        private enum CodingKeys: String, CodingKey {
            case deviceGroupKey = "DeviceGroupKey"
            case deviceKey = "DeviceKey"
        }
    }

    public struct NotifyConfigurationType: AWSEncodableShape & AWSDecodableShape {
        /// The template for the email message that your user pool sends when a detected risk event is blocked.
        public let blockEmail: NotifyEmailType?
        /// The email address that sends the email message. The address must be either individually verified with Amazon Simple Email Service, or from a domain that has been verified with Amazon SES.
        public let from: String?
        /// The template for the email message that your user pool sends when MFA is challenged in response to a detected risk.
        public let mfaEmail: NotifyEmailType?
        /// The template for the email message that your user pool sends when no action is taken in response to a detected risk.
        public let noActionEmail: NotifyEmailType?
        /// The reply-to email address of an email template.
        public let replyTo: String?
        /// The Amazon Resource Name (ARN) of the identity that is associated with the sending authorization policy. This identity permits Amazon Cognito to send for the email address specified in the From parameter.
        public let sourceArn: String

        @inlinable
        public init(blockEmail: NotifyEmailType? = nil, from: String? = nil, mfaEmail: NotifyEmailType? = nil, noActionEmail: NotifyEmailType? = nil, replyTo: String? = nil, sourceArn: String) {
            self.blockEmail = blockEmail
            self.from = from
            self.mfaEmail = mfaEmail
            self.noActionEmail = noActionEmail
            self.replyTo = replyTo
            self.sourceArn = sourceArn
        }

        public func validate(name: String) throws {
            try self.blockEmail?.validate(name: "\(name).blockEmail")
            try self.validate(self.from, name: "from", parent: name, max: 131072)
            try self.mfaEmail?.validate(name: "\(name).mfaEmail")
            try self.noActionEmail?.validate(name: "\(name).noActionEmail")
            try self.validate(self.replyTo, name: "replyTo", parent: name, max: 131072)
            try self.validate(self.sourceArn, name: "sourceArn", parent: name, max: 2048)
            try self.validate(self.sourceArn, name: "sourceArn", parent: name, min: 20)
            try self.validate(self.sourceArn, name: "sourceArn", parent: name, pattern: "^arn:[\\w+=/,.@-]+:[\\w+=/,.@-]+:([\\w+=/,.@-]*)?:[0-9]+:[\\w+=/,.@-]+(:[\\w+=/,.@-]+)?(:[\\w+=/,.@-]+)?$")
        }

        private enum CodingKeys: String, CodingKey {
            case blockEmail = "BlockEmail"
            case from = "From"
            case mfaEmail = "MfaEmail"
            case noActionEmail = "NoActionEmail"
            case replyTo = "ReplyTo"
            case sourceArn = "SourceArn"
        }
    }

    public struct NotifyEmailType: AWSEncodableShape & AWSDecodableShape {
        /// The body of an email notification formatted in HTML. Choose an HtmlBody or a TextBody to send an HTML-formatted or plaintext message, respectively.
        public let htmlBody: String?
        /// The subject of the threat protection email notification.
        public let subject: String
        /// The body of an email notification formatted in plaintext. Choose an HtmlBody or a TextBody to send an HTML-formatted or plaintext message, respectively.
        public let textBody: String?

        @inlinable
        public init(htmlBody: String? = nil, subject: String, textBody: String? = nil) {
            self.htmlBody = htmlBody
            self.subject = subject
            self.textBody = textBody
        }

        public func validate(name: String) throws {
            try self.validate(self.htmlBody, name: "htmlBody", parent: name, max: 20000)
            try self.validate(self.htmlBody, name: "htmlBody", parent: name, min: 6)
            try self.validate(self.htmlBody, name: "htmlBody", parent: name, pattern: "^[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}\\s*]+$")
            try self.validate(self.subject, name: "subject", parent: name, max: 140)
            try self.validate(self.subject, name: "subject", parent: name, min: 1)
            try self.validate(self.subject, name: "subject", parent: name, pattern: "^[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}\\s]+$")
            try self.validate(self.textBody, name: "textBody", parent: name, max: 20000)
            try self.validate(self.textBody, name: "textBody", parent: name, min: 6)
            try self.validate(self.textBody, name: "textBody", parent: name, pattern: "^[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}\\s*]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case htmlBody = "HtmlBody"
            case subject = "Subject"
            case textBody = "TextBody"
        }
    }

    public struct NumberAttributeConstraintsType: AWSEncodableShape & AWSDecodableShape {
        /// The maximum length of a number attribute value. Must be a number less than or equal to 2^1023, represented as a string with a length of 131072 characters or fewer.
        public let maxValue: String?
        /// The minimum value of an attribute that is of the number data type.
        public let minValue: String?

        @inlinable
        public init(maxValue: String? = nil, minValue: String? = nil) {
            self.maxValue = maxValue
            self.minValue = minValue
        }

        public func validate(name: String) throws {
            try self.validate(self.maxValue, name: "maxValue", parent: name, max: 131072)
            try self.validate(self.minValue, name: "minValue", parent: name, max: 131072)
        }

        private enum CodingKeys: String, CodingKey {
            case maxValue = "MaxValue"
            case minValue = "MinValue"
        }
    }

    public struct PasswordPolicyType: AWSEncodableShape & AWSDecodableShape {
        /// The minimum length of the password in the policy that you have set. This value can't be less than 6.
        public let minimumLength: Int?
        /// The number of previous passwords that you want Amazon Cognito to restrict each user from reusing. Users can't set a password that matches any of n previous passwords, where n is the value of PasswordHistorySize.
        public let passwordHistorySize: Int?
        /// The requirement in a password policy that users must include at least one lowercase letter in their password.
        public let requireLowercase: Bool?
        /// The requirement in a password policy that users must include at least one number in their password.
        public let requireNumbers: Bool?
        /// The requirement in a password policy that users must include at least one symbol in their password.
        public let requireSymbols: Bool?
        /// The requirement in a password policy that users must include at least one uppercase letter in their password.
        public let requireUppercase: Bool?
        /// The number of days a temporary password is valid in the password policy. If the user doesn't sign in during this time, an administrator must reset their password. Defaults to 7. If you submit a value of 0, Amazon Cognito treats it as a null value and sets TemporaryPasswordValidityDays to its default value.  When you set TemporaryPasswordValidityDays for a user pool, you can no longer set a value for the legacy UnusedAccountValidityDays parameter in that user pool.
        public let temporaryPasswordValidityDays: Int?

        @inlinable
        public init(minimumLength: Int? = nil, passwordHistorySize: Int? = nil, requireLowercase: Bool? = nil, requireNumbers: Bool? = nil, requireSymbols: Bool? = nil, requireUppercase: Bool? = nil, temporaryPasswordValidityDays: Int? = nil) {
            self.minimumLength = minimumLength
            self.passwordHistorySize = passwordHistorySize
            self.requireLowercase = requireLowercase
            self.requireNumbers = requireNumbers
            self.requireSymbols = requireSymbols
            self.requireUppercase = requireUppercase
            self.temporaryPasswordValidityDays = temporaryPasswordValidityDays
        }

        public func validate(name: String) throws {
            try self.validate(self.minimumLength, name: "minimumLength", parent: name, max: 99)
            try self.validate(self.minimumLength, name: "minimumLength", parent: name, min: 6)
            try self.validate(self.passwordHistorySize, name: "passwordHistorySize", parent: name, max: 24)
            try self.validate(self.passwordHistorySize, name: "passwordHistorySize", parent: name, min: 0)
            try self.validate(self.temporaryPasswordValidityDays, name: "temporaryPasswordValidityDays", parent: name, max: 365)
            try self.validate(self.temporaryPasswordValidityDays, name: "temporaryPasswordValidityDays", parent: name, min: 0)
        }

        private enum CodingKeys: String, CodingKey {
            case minimumLength = "MinimumLength"
            case passwordHistorySize = "PasswordHistorySize"
            case requireLowercase = "RequireLowercase"
            case requireNumbers = "RequireNumbers"
            case requireSymbols = "RequireSymbols"
            case requireUppercase = "RequireUppercase"
            case temporaryPasswordValidityDays = "TemporaryPasswordValidityDays"
        }
    }

    public struct PreTokenGenerationVersionConfigType: AWSEncodableShape & AWSDecodableShape {
        /// The Amazon Resource Name (ARN) of the function that you want to assign to your Lambda trigger. This parameter and the PreTokenGeneration property of LambdaConfig have the same value. For new instances of pre token generation triggers, set LambdaArn.
        public let lambdaArn: String
        /// The user pool trigger version of the request that Amazon Cognito sends to your Lambda function. Higher-numbered versions add fields that support new features.
        public let lambdaVersion: PreTokenGenerationLambdaVersionType

        @inlinable
        public init(lambdaArn: String, lambdaVersion: PreTokenGenerationLambdaVersionType) {
            self.lambdaArn = lambdaArn
            self.lambdaVersion = lambdaVersion
        }

        public func validate(name: String) throws {
            try self.validate(self.lambdaArn, name: "lambdaArn", parent: name, max: 2048)
            try self.validate(self.lambdaArn, name: "lambdaArn", parent: name, min: 20)
            try self.validate(self.lambdaArn, name: "lambdaArn", parent: name, pattern: "^arn:[\\w+=/,.@-]+:[\\w+=/,.@-]+:([\\w+=/,.@-]*)?:[0-9]+:[\\w+=/,.@-]+(:[\\w+=/,.@-]+)?(:[\\w+=/,.@-]+)?$")
        }

        private enum CodingKeys: String, CodingKey {
            case lambdaArn = "LambdaArn"
            case lambdaVersion = "LambdaVersion"
        }
    }

    public struct ProviderDescription: AWSDecodableShape {
        /// The date and time when the item was created. Amazon Cognito returns this timestamp in UNIX epoch time format. Your SDK might render the output in a
        /// human-readable format like ISO 8601 or a Java Date object.
        public let creationDate: Date?
        /// The date and time when the item was modified. Amazon Cognito returns this timestamp in UNIX epoch time format. Your SDK might render the output in a
        /// human-readable format like ISO 8601 or a Java Date object.
        public let lastModifiedDate: Date?
        /// The name of the IdP, for example MySAMLProvider.
        public let providerName: String?
        /// The type of the provider, for example SAML. Amazon Cognito supports SAML 2.0, OIDC, and social IdPs. User pools list supported social IdPs by name in this response parameter: Facebook, Google, Login with Amazon, and Sign in with Apple.
        public let providerType: IdentityProviderTypeType?

        @inlinable
        public init(creationDate: Date? = nil, lastModifiedDate: Date? = nil, providerName: String? = nil, providerType: IdentityProviderTypeType? = nil) {
            self.creationDate = creationDate
            self.lastModifiedDate = lastModifiedDate
            self.providerName = providerName
            self.providerType = providerType
        }

        private enum CodingKeys: String, CodingKey {
            case creationDate = "CreationDate"
            case lastModifiedDate = "LastModifiedDate"
            case providerName = "ProviderName"
            case providerType = "ProviderType"
        }
    }

    public struct ProviderUserIdentifierType: AWSEncodableShape {
        /// The name of the provider attribute to link to, such as NameID.
        public let providerAttributeName: String?
        /// The value of the provider attribute to link to, such as xxxxx_account.
        public let providerAttributeValue: String?
        /// The name of the provider, such as Facebook, Google, or Login with Amazon.
        public let providerName: String?

        @inlinable
        public init(providerAttributeName: String? = nil, providerAttributeValue: String? = nil, providerName: String? = nil) {
            self.providerAttributeName = providerAttributeName
            self.providerAttributeValue = providerAttributeValue
            self.providerName = providerName
        }

        public func validate(name: String) throws {
            try self.validate(self.providerAttributeName, name: "providerAttributeName", parent: name, max: 131072)
            try self.validate(self.providerAttributeValue, name: "providerAttributeValue", parent: name, max: 131072)
            try self.validate(self.providerName, name: "providerName", parent: name, max: 32)
            try self.validate(self.providerName, name: "providerName", parent: name, min: 1)
            try self.validate(self.providerName, name: "providerName", parent: name, pattern: "^[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}\\p{Z}]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case providerAttributeName = "ProviderAttributeName"
            case providerAttributeValue = "ProviderAttributeValue"
            case providerName = "ProviderName"
        }
    }

    public struct RecoveryOptionType: AWSEncodableShape & AWSDecodableShape {
        /// The recovery method that this object sets a recovery option for.
        public let name: RecoveryOptionNameType
        /// Your priority preference for using the specified attribute in account recovery. The highest priority is 1.
        public let priority: Int

        @inlinable
        public init(name: RecoveryOptionNameType, priority: Int) {
            self.name = name
            self.priority = priority
        }

        public func validate(name: String) throws {
            try self.validate(self.priority, name: "priority", parent: name, max: 2)
            try self.validate(self.priority, name: "priority", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case name = "Name"
            case priority = "Priority"
        }
    }

    public struct RefreshTokenRotationType: AWSEncodableShape & AWSDecodableShape {
        /// The state of refresh token rotation for the current app client.
        public let feature: FeatureType
        /// When you request a token refresh with GetTokensFromRefreshToken, the original refresh token that you're rotating out can remain valid for a period of time of up to 60 seconds. This allows for client-side retries. When RetryGracePeriodSeconds is 0, the grace period is disabled and a successful request immediately invalidates the submitted refresh token.
        public let retryGracePeriodSeconds: Int?

        @inlinable
        public init(feature: FeatureType, retryGracePeriodSeconds: Int? = nil) {
            self.feature = feature
            self.retryGracePeriodSeconds = retryGracePeriodSeconds
        }

        public func validate(name: String) throws {
            try self.validate(self.retryGracePeriodSeconds, name: "retryGracePeriodSeconds", parent: name, max: 60)
            try self.validate(self.retryGracePeriodSeconds, name: "retryGracePeriodSeconds", parent: name, min: 0)
        }

        private enum CodingKeys: String, CodingKey {
            case feature = "Feature"
            case retryGracePeriodSeconds = "RetryGracePeriodSeconds"
        }
    }

    public struct ResendConfirmationCodeRequest: AWSEncodableShape {
        /// Information that supports analytics outcomes with Amazon Pinpoint, including the
        /// user's endpoint ID. The endpoint ID is a destination for Amazon Pinpoint push notifications, for example a device identifier,
        /// email address, or phone number.
        public let analyticsMetadata: AnalyticsMetadataType?
        /// The ID of the user pool app client where the user signed up.
        public let clientId: String
        /// A map of custom key-value pairs that you can provide as input for any custom workflows that this action triggers. You create custom workflows by assigning Lambda functions to user pool triggers. When you use the ResendConfirmationCode API action, Amazon Cognito invokes the function that is assigned to the custom message trigger. When Amazon Cognito invokes this function, it passes a JSON payload, which the function receives as input. This payload contains a clientMetadata attribute, which provides the data that you assigned to the ClientMetadata parameter in your ResendConfirmationCode request. In your function code in Lambda, you can process the clientMetadata value to enhance your workflow for your specific needs. For more information, see
        /// Using Lambda triggers in the Amazon Cognito Developer Guide.  When you use the ClientMetadata parameter, note that Amazon Cognito won't do the following:   Store the ClientMetadata value. This data is available only to Lambda triggers that are assigned to a user pool to support custom workflows. If your user pool configuration doesn't include triggers, the ClientMetadata parameter serves no purpose.   Validate the ClientMetadata value.   Encrypt the ClientMetadata value. Don't send sensitive information in this parameter.
        public let clientMetadata: [String: String]?
        /// A keyed-hash message authentication code (HMAC) calculated using the secret key of a user pool client and username plus the client ID in the message. For more information about SecretHash, see Computing secret hash values.
        public let secretHash: String?
        /// Contextual data about your user session like the device fingerprint, IP address, or location. Amazon Cognito threat
        /// protection evaluates the risk of an authentication event based on the context that your app generates and passes to Amazon Cognito
        /// when it makes API requests. For more information, see Collecting data for threat protection in
        /// applications.
        public let userContextData: UserContextDataType?
        /// The name of the user that you want to query or modify. The value of this parameter is typically your user's username, but it can be any of their alias attributes. If username isn't an alias attribute in your user pool, this value must be the sub of a local user or the username of a user from a third-party IdP.
        public let username: String

        @inlinable
        public init(analyticsMetadata: AnalyticsMetadataType? = nil, clientId: String, clientMetadata: [String: String]? = nil, secretHash: String? = nil, userContextData: UserContextDataType? = nil, username: String) {
            self.analyticsMetadata = analyticsMetadata
            self.clientId = clientId
            self.clientMetadata = clientMetadata
            self.secretHash = secretHash
            self.userContextData = userContextData
            self.username = username
        }

        public func validate(name: String) throws {
            try self.analyticsMetadata?.validate(name: "\(name).analyticsMetadata")
            try self.validate(self.clientId, name: "clientId", parent: name, max: 128)
            try self.validate(self.clientId, name: "clientId", parent: name, min: 1)
            try self.validate(self.clientId, name: "clientId", parent: name, pattern: "^[\\w+]+$")
            try self.clientMetadata?.forEach {
                try validate($0.key, name: "clientMetadata.key", parent: name, max: 131072)
                try validate($0.value, name: "clientMetadata[\"\($0.key)\"]", parent: name, max: 131072)
            }
            try self.validate(self.secretHash, name: "secretHash", parent: name, max: 128)
            try self.validate(self.secretHash, name: "secretHash", parent: name, min: 1)
            try self.validate(self.secretHash, name: "secretHash", parent: name, pattern: "^[\\w+=/]+$")
            try self.userContextData?.validate(name: "\(name).userContextData")
            try self.validate(self.username, name: "username", parent: name, max: 128)
            try self.validate(self.username, name: "username", parent: name, min: 1)
            try self.validate(self.username, name: "username", parent: name, pattern: "^[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case analyticsMetadata = "AnalyticsMetadata"
            case clientId = "ClientId"
            case clientMetadata = "ClientMetadata"
            case secretHash = "SecretHash"
            case userContextData = "UserContextData"
            case username = "Username"
        }
    }

    public struct ResendConfirmationCodeResponse: AWSDecodableShape {
        /// Information about the phone number or email address that Amazon Cognito sent the confirmation code to.
        public let codeDeliveryDetails: CodeDeliveryDetailsType?

        @inlinable
        public init(codeDeliveryDetails: CodeDeliveryDetailsType? = nil) {
            self.codeDeliveryDetails = codeDeliveryDetails
        }

        private enum CodingKeys: String, CodingKey {
            case codeDeliveryDetails = "CodeDeliveryDetails"
        }
    }

    public struct ResourceServerScopeType: AWSEncodableShape & AWSDecodableShape {
        /// A friendly description of a custom scope.
        public let scopeDescription: String
        /// The name of the scope. Amazon Cognito renders custom scopes in the format resourceServerIdentifier/ScopeName. For example, if this parameter is exampleScope in the resource server with the identifier exampleResourceServer, you request and receive the scope exampleResourceServer/exampleScope.
        public let scopeName: String

        @inlinable
        public init(scopeDescription: String, scopeName: String) {
            self.scopeDescription = scopeDescription
            self.scopeName = scopeName
        }

        public func validate(name: String) throws {
            try self.validate(self.scopeDescription, name: "scopeDescription", parent: name, max: 256)
            try self.validate(self.scopeDescription, name: "scopeDescription", parent: name, min: 1)
            try self.validate(self.scopeName, name: "scopeName", parent: name, max: 256)
            try self.validate(self.scopeName, name: "scopeName", parent: name, min: 1)
            try self.validate(self.scopeName, name: "scopeName", parent: name, pattern: "^[\\x21\\x23-\\x2E\\x30-\\x5B\\x5D-\\x7E]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case scopeDescription = "ScopeDescription"
            case scopeName = "ScopeName"
        }
    }

    public struct ResourceServerType: AWSDecodableShape {
        /// A unique resource server identifier for the resource server. The identifier can be an API friendly name like solar-system-data. You can also set an API URL like https://solar-system-data-api.example.com as your identifier. Amazon Cognito represents scopes in the access token in the format $resource-server-identifier/$scope. Longer scope-identifier strings increase the size of your access tokens.
        public let identifier: String?
        /// The name of the resource server.
        public let name: String?
        /// A list of scopes that are defined for the resource server.
        public let scopes: [ResourceServerScopeType]?
        /// The ID of the user pool that contains the resource server configuration.
        public let userPoolId: String?

        @inlinable
        public init(identifier: String? = nil, name: String? = nil, scopes: [ResourceServerScopeType]? = nil, userPoolId: String? = nil) {
            self.identifier = identifier
            self.name = name
            self.scopes = scopes
            self.userPoolId = userPoolId
        }

        private enum CodingKeys: String, CodingKey {
            case identifier = "Identifier"
            case name = "Name"
            case scopes = "Scopes"
            case userPoolId = "UserPoolId"
        }
    }

    public struct RespondToAuthChallengeRequest: AWSEncodableShape {
        /// Information that supports analytics outcomes with Amazon Pinpoint, including the
        /// user's endpoint ID. The endpoint ID is a destination for Amazon Pinpoint push notifications, for example a device identifier,
        /// email address, or phone number.
        public let analyticsMetadata: AnalyticsMetadataType?
        /// The name of the challenge that you are responding to.  You can't respond to an ADMIN_NO_SRP_AUTH challenge with this operation.  Possible challenges include the following:  All of the following challenges require USERNAME and, when the app client has a client secret, SECRET_HASH in the parameters. Include a  DEVICE_KEY for device authentication.     WEB_AUTHN: Respond to the challenge with the results of a successful authentication with a WebAuthn authenticator, or passkey, as  CREDENTIAL. Examples of WebAuthn authenticators include  biometric devices and security keys.    PASSWORD: Respond with the user's password as PASSWORD.    PASSWORD_SRP: Respond with the initial SRP secret as SRP_A.    SELECT_CHALLENGE: Respond with a challenge selection as ANSWER.  It must be one of the challenge types in the AvailableChallenges response  parameter. Add the parameters of the selected challenge, for example USERNAME and SMS_OTP.    SMS_MFA: Respond with the code that your user pool delivered in an SMS message, as SMS_MFA_CODE     EMAIL_MFA: Respond with the code that your user pool delivered in an email message, as EMAIL_MFA_CODE     EMAIL_OTP: Respond with the code that your user pool delivered in an email message, as EMAIL_OTP_CODE .    SMS_OTP: Respond with the code that your user pool delivered in an SMS message, as SMS_OTP_CODE.    PASSWORD_VERIFIER: Respond with the second stage of SRP secrets as PASSWORD_CLAIM_SIGNATURE, PASSWORD_CLAIM_SECRET_BLOCK,  and TIMESTAMP.    CUSTOM_CHALLENGE: This is returned if your custom authentication flow determines that the user should pass another challenge before tokens are issued. The parameters of the challenge are determined by your Lambda function and issued in the ChallengeParameters of a challenge response.    DEVICE_SRP_AUTH: Respond with the initial parameters of device SRP  authentication. For more information, see Signing in with a device.    DEVICE_PASSWORD_VERIFIER: Respond with PASSWORD_CLAIM_SIGNATURE, PASSWORD_CLAIM_SECRET_BLOCK, and TIMESTAMP after client-side SRP calculations. For more information, see Signing in with a device.    NEW_PASSWORD_REQUIRED: For users who are required to change their passwords after successful first login. Respond to this challenge with  NEW_PASSWORD and any required attributes that Amazon Cognito returned in  the requiredAttributes parameter. You can also set values for  attributes that aren't required by your user pool and that your app client  can write. Amazon Cognito only returns this challenge for users who have temporary passwords. When you create passwordless users, you must provide values for all required  attributes.  In a NEW_PASSWORD_REQUIRED challenge response, you can't modify a required attribute that already has a value.
        /// In AdminRespondToAuthChallenge or RespondToAuthChallenge, set a value for any keys that Amazon Cognito returned in the
        /// requiredAttributes parameter, then use the AdminUpdateUserAttributes or UpdateUserAttributes API
        /// operation to modify the value of any additional attributes.     MFA_SETUP: For users who are required to setup an MFA factor before they can sign in. The MFA types activated for the user pool will be listed in the challenge parameters MFAS_CAN_SETUP value.  To set up time-based one-time password (TOTP) MFA, use the session returned  in this challenge from InitiateAuth or AdminInitiateAuth  as an input to AssociateSoftwareToken. Then, use the session returned by VerifySoftwareToken as an input to  RespondToAuthChallenge or AdminRespondToAuthChallenge with challenge name MFA_SETUP to complete sign-in.  To set up SMS or email MFA, collect a phone_number or  email attribute for the user. Then restart the authentication  flow with an InitiateAuth or AdminInitiateAuth request.
        public let challengeName: ChallengeNameType
        /// The responses to the challenge that you received in the previous request. Each challenge has its own required response parameters. The following examples are partial JSON request bodies that highlight challenge-response parameters.  You must provide a SECRET_HASH parameter in all challenge responses to an app client that has a client secret. Include a DEVICE_KEY for device authentication.   SELECT_CHALLENGE   "ChallengeName": "SELECT_CHALLENGE", "ChallengeResponses": { "USERNAME": "[username]", "ANSWER": "[Challenge name]"}  Available challenges are PASSWORD, PASSWORD_SRP,  EMAIL_OTP, SMS_OTP, and WEB_AUTHN. Complete authentication in the SELECT_CHALLENGE response for PASSWORD, PASSWORD_SRP, and WEB_AUTHN:    "ChallengeName": "SELECT_CHALLENGE", "ChallengeResponses": { "ANSWER": "WEB_AUTHN", "USERNAME": "[username]", "CREDENTIAL": "[AuthenticationResponseJSON]"}  See  AuthenticationResponseJSON.    "ChallengeName": "SELECT_CHALLENGE", "ChallengeResponses": { "ANSWER": "PASSWORD", "USERNAME": "[username]", "PASSWORD": "[password]"}     "ChallengeName": "SELECT_CHALLENGE", "ChallengeResponses": { "ANSWER": "PASSWORD_SRP", "USERNAME": "[username]", "SRP_A": "[SRP_A]"}    For SMS_OTP and EMAIL_OTP, respond with the username and answer. Your user pool will send a code for the user to submit in the next challenge response.    "ChallengeName": "SELECT_CHALLENGE", "ChallengeResponses": { "ANSWER": "SMS_OTP", "USERNAME": "[username]"}     "ChallengeName": "SELECT_CHALLENGE", "ChallengeResponses": { "ANSWER": "EMAIL_OTP", "USERNAME": "[username]"}     WEB_AUTHN   "ChallengeName": "WEB_AUTHN", "ChallengeResponses": { "USERNAME": "[username]", "CREDENTIAL": "[AuthenticationResponseJSON]"}  See  AuthenticationResponseJSON.  PASSWORD   "ChallengeName": "PASSWORD", "ChallengeResponses": { "USERNAME": "[username]", "PASSWORD": "[password]"}   PASSWORD_SRP   "ChallengeName": "PASSWORD_SRP", "ChallengeResponses": { "USERNAME": "[username]", "SRP_A": "[SRP_A]"}   SMS_OTP   "ChallengeName": "SMS_OTP", "ChallengeResponses":  {"SMS_OTP_CODE": "[code]", "USERNAME": "[username]"}   EMAIL_OTP   "ChallengeName": "EMAIL_OTP", "ChallengeResponses": {"EMAIL_OTP_CODE": "[code]", "USERNAME": "[username]"}   SMS_MFA   "ChallengeName": "SMS_MFA", "ChallengeResponses": {"SMS_MFA_CODE": "[code]", "USERNAME": "[username]"}   PASSWORD_VERIFIER  This challenge response is part of the SRP flow. Amazon Cognito requires  that your application respond to this challenge within a few seconds. When the response time exceeds this period, your user pool returns a NotAuthorizedException error.  "ChallengeName": "PASSWORD_VERIFIER", "ChallengeResponses": {"PASSWORD_CLAIM_SIGNATURE": "[claim_signature]", "PASSWORD_CLAIM_SECRET_BLOCK": "[secret_block]", "TIMESTAMP": [timestamp], "USERNAME": "[username]"}   CUSTOM_CHALLENGE   "ChallengeName": "CUSTOM_CHALLENGE", "ChallengeResponses": {"USERNAME": "[username]", "ANSWER": "[challenge_answer]"}   NEW_PASSWORD_REQUIRED   "ChallengeName": "NEW_PASSWORD_REQUIRED", "ChallengeResponses": {"NEW_PASSWORD": "[new_password]", "USERNAME": "[username]"}  To set any required attributes that InitiateAuth returned in an requiredAttributes parameter, add "userAttributes.[attribute_name]": "[attribute_value]". This parameter can also set values for writable attributes that aren't required by your user pool.  In a NEW_PASSWORD_REQUIRED challenge response, you can't modify a required attribute that already has a value.
        /// In AdminRespondToAuthChallenge or RespondToAuthChallenge, set a value for any keys that Amazon Cognito returned in the
        /// requiredAttributes parameter, then use the AdminUpdateUserAttributes or UpdateUserAttributes API
        /// operation to modify the value of any additional attributes.   SOFTWARE_TOKEN_MFA   "ChallengeName": "SOFTWARE_TOKEN_MFA", "ChallengeResponses": {"USERNAME": "[username]", "SOFTWARE_TOKEN_MFA_CODE": [authenticator_code]}   DEVICE_SRP_AUTH   "ChallengeName": "DEVICE_SRP_AUTH", "ChallengeResponses": {"USERNAME": "[username]", "DEVICE_KEY": "[device_key]", "SRP_A": "[srp_a]"}   DEVICE_PASSWORD_VERIFIER   "ChallengeName": "DEVICE_PASSWORD_VERIFIER", "ChallengeResponses": {"DEVICE_KEY": "[device_key]", "PASSWORD_CLAIM_SIGNATURE": "[claim_signature]", "PASSWORD_CLAIM_SECRET_BLOCK": "[secret_block]", "TIMESTAMP": [timestamp], "USERNAME": "[username]"}   MFA_SETUP   "ChallengeName": "MFA_SETUP", "ChallengeResponses": {"USERNAME": "[username]"}, "SESSION": "[Session ID from VerifySoftwareToken]"   SELECT_MFA_TYPE   "ChallengeName": "SELECT_MFA_TYPE", "ChallengeResponses": {"USERNAME": "[username]", "ANSWER": "[SMS_MFA|EMAIL_MFA|SOFTWARE_TOKEN_MFA]"}    For more information about SECRET_HASH, see Computing secret hash values. For information about DEVICE_KEY, see Working with user devices in your user pool.
        public let challengeResponses: [String: String]?
        /// The ID of the app client where the user is signing in.
        public let clientId: String
        /// A map of custom key-value pairs that you can provide as input for any custom workflows that this action triggers. You create custom workflows by assigning Lambda functions to user pool triggers. When you use the RespondToAuthChallenge API action, Amazon Cognito invokes any functions that are assigned to the following triggers: post authentication, pre token generation, define auth challenge, create auth challenge, and verify auth challenge. When Amazon Cognito invokes any of these functions, it passes a JSON payload, which the function receives as input. This payload contains a clientMetadata attribute, which provides the data that you assigned to the ClientMetadata parameter in your RespondToAuthChallenge request. In your function code in Lambda, you can process the clientMetadata value to enhance your workflow for your specific needs. For more information, see
        /// Using Lambda triggers in the Amazon Cognito Developer Guide.  When you use the ClientMetadata parameter, note that Amazon Cognito won't do the following:   Store the ClientMetadata value. This data is available only to Lambda triggers that are assigned to a user pool to support custom workflows. If your user pool configuration doesn't include triggers, the ClientMetadata parameter serves no purpose.   Validate the ClientMetadata value.   Encrypt the ClientMetadata value. Don't send sensitive information in this parameter.
        public let clientMetadata: [String: String]?
        /// The session identifier that maintains the state of authentication requests and challenge responses. If an AdminInitiateAuth or AdminRespondToAuthChallenge API request results in a determination that your application must pass another challenge, Amazon Cognito returns a session with other challenge parameters. Send this session identifier, unmodified, to the next AdminRespondToAuthChallenge request.
        public let session: String?
        /// Contextual data about your user session like the device fingerprint, IP address, or location. Amazon Cognito threat
        /// protection evaluates the risk of an authentication event based on the context that your app generates and passes to Amazon Cognito
        /// when it makes API requests. For more information, see Collecting data for threat protection in
        /// applications.
        public let userContextData: UserContextDataType?

        @inlinable
        public init(analyticsMetadata: AnalyticsMetadataType? = nil, challengeName: ChallengeNameType, challengeResponses: [String: String]? = nil, clientId: String, clientMetadata: [String: String]? = nil, session: String? = nil, userContextData: UserContextDataType? = nil) {
            self.analyticsMetadata = analyticsMetadata
            self.challengeName = challengeName
            self.challengeResponses = challengeResponses
            self.clientId = clientId
            self.clientMetadata = clientMetadata
            self.session = session
            self.userContextData = userContextData
        }

        public func validate(name: String) throws {
            try self.analyticsMetadata?.validate(name: "\(name).analyticsMetadata")
            try self.challengeResponses?.forEach {
                try validate($0.key, name: "challengeResponses.key", parent: name, max: 131072)
                try validate($0.value, name: "challengeResponses[\"\($0.key)\"]", parent: name, max: 131072)
            }
            try self.validate(self.clientId, name: "clientId", parent: name, max: 128)
            try self.validate(self.clientId, name: "clientId", parent: name, min: 1)
            try self.validate(self.clientId, name: "clientId", parent: name, pattern: "^[\\w+]+$")
            try self.clientMetadata?.forEach {
                try validate($0.key, name: "clientMetadata.key", parent: name, max: 131072)
                try validate($0.value, name: "clientMetadata[\"\($0.key)\"]", parent: name, max: 131072)
            }
            try self.validate(self.session, name: "session", parent: name, max: 2048)
            try self.validate(self.session, name: "session", parent: name, min: 20)
            try self.userContextData?.validate(name: "\(name).userContextData")
        }

        private enum CodingKeys: String, CodingKey {
            case analyticsMetadata = "AnalyticsMetadata"
            case challengeName = "ChallengeName"
            case challengeResponses = "ChallengeResponses"
            case clientId = "ClientId"
            case clientMetadata = "ClientMetadata"
            case session = "Session"
            case userContextData = "UserContextData"
        }
    }

    public struct RespondToAuthChallengeResponse: AWSDecodableShape {
        /// The outcome of a successful authentication process. After your application has passed all challenges, Amazon Cognito returns an AuthenticationResult with the JSON web tokens (JWTs) that indicate successful sign-in.
        public let authenticationResult: AuthenticationResultType?
        /// The name of the next challenge that you must respond to. Possible challenges include the following:  All of the following challenges require USERNAME and, when the app client has a client secret, SECRET_HASH in the parameters. Include a  DEVICE_KEY for device authentication.     WEB_AUTHN: Respond to the challenge with the results of a successful authentication with a WebAuthn authenticator, or passkey, as  CREDENTIAL. Examples of WebAuthn authenticators include  biometric devices and security keys.    PASSWORD: Respond with the user's password as PASSWORD.    PASSWORD_SRP: Respond with the initial SRP secret as SRP_A.    SELECT_CHALLENGE: Respond with a challenge selection as ANSWER.  It must be one of the challenge types in the AvailableChallenges response  parameter. Add the parameters of the selected challenge, for example USERNAME and SMS_OTP.    SMS_MFA: Respond with the code that your user pool delivered in an SMS message, as SMS_MFA_CODE     EMAIL_MFA: Respond with the code that your user pool delivered in an email message, as EMAIL_MFA_CODE     EMAIL_OTP: Respond with the code that your user pool delivered in an email message, as EMAIL_OTP_CODE .    SMS_OTP: Respond with the code that your user pool delivered in an SMS message, as SMS_OTP_CODE.    PASSWORD_VERIFIER: Respond with the second stage of SRP secrets as PASSWORD_CLAIM_SIGNATURE, PASSWORD_CLAIM_SECRET_BLOCK,  and TIMESTAMP.    CUSTOM_CHALLENGE: This is returned if your custom authentication flow determines that the user should pass another challenge before tokens are issued. The parameters of the challenge are determined by your Lambda function and issued in the ChallengeParameters of a challenge response.    DEVICE_SRP_AUTH: Respond with the initial parameters of device SRP  authentication. For more information, see Signing in with a device.    DEVICE_PASSWORD_VERIFIER: Respond with PASSWORD_CLAIM_SIGNATURE, PASSWORD_CLAIM_SECRET_BLOCK, and TIMESTAMP after client-side SRP calculations. For more information, see Signing in with a device.    NEW_PASSWORD_REQUIRED: For users who are required to change their passwords after successful first login. Respond to this challenge with  NEW_PASSWORD and any required attributes that Amazon Cognito returned in  the requiredAttributes parameter. You can also set values for  attributes that aren't required by your user pool and that your app client  can write. Amazon Cognito only returns this challenge for users who have temporary passwords. When you create passwordless users, you must provide values for all required  attributes.  In a NEW_PASSWORD_REQUIRED challenge response, you can't modify a required attribute that already has a value.
        /// In AdminRespondToAuthChallenge or RespondToAuthChallenge, set a value for any keys that Amazon Cognito returned in the
        /// requiredAttributes parameter, then use the AdminUpdateUserAttributes or UpdateUserAttributes API
        /// operation to modify the value of any additional attributes.     MFA_SETUP: For users who are required to setup an MFA factor before they can sign in. The MFA types activated for the user pool will be listed in the challenge parameters MFAS_CAN_SETUP value.  To set up time-based one-time password (TOTP) MFA, use the session returned  in this challenge from InitiateAuth or AdminInitiateAuth  as an input to AssociateSoftwareToken. Then, use the session returned by VerifySoftwareToken as an input to  RespondToAuthChallenge or AdminRespondToAuthChallenge with challenge name MFA_SETUP to complete sign-in.  To set up SMS or email MFA, collect a phone_number or  email attribute for the user. Then restart the authentication  flow with an InitiateAuth or AdminInitiateAuth request.
        public let challengeName: ChallengeNameType?
        /// The parameters that define your response to the next challenge.
        public let challengeParameters: [String: String]?
        /// The session identifier that maintains the state of authentication requests and challenge responses. If an InitiateAuth or RespondToAuthChallenge API request results in a determination that your application must pass another challenge, Amazon Cognito returns a session with other challenge parameters. Send this session identifier, unmodified, to the next RespondToAuthChallenge request.
        public let session: String?

        @inlinable
        public init(authenticationResult: AuthenticationResultType? = nil, challengeName: ChallengeNameType? = nil, challengeParameters: [String: String]? = nil, session: String? = nil) {
            self.authenticationResult = authenticationResult
            self.challengeName = challengeName
            self.challengeParameters = challengeParameters
            self.session = session
        }

        private enum CodingKeys: String, CodingKey {
            case authenticationResult = "AuthenticationResult"
            case challengeName = "ChallengeName"
            case challengeParameters = "ChallengeParameters"
            case session = "Session"
        }
    }

    public struct RevokeTokenRequest: AWSEncodableShape {
        /// The ID of the app client where the token that you want to revoke was issued.
        public let clientId: String
        /// The client secret of the requested app client, if the client has a secret.
        public let clientSecret: String?
        /// The refresh token that you want to revoke.
        public let token: String

        @inlinable
        public init(clientId: String, clientSecret: String? = nil, token: String) {
            self.clientId = clientId
            self.clientSecret = clientSecret
            self.token = token
        }

        public func validate(name: String) throws {
            try self.validate(self.clientId, name: "clientId", parent: name, max: 128)
            try self.validate(self.clientId, name: "clientId", parent: name, min: 1)
            try self.validate(self.clientId, name: "clientId", parent: name, pattern: "^[\\w+]+$")
            try self.validate(self.clientSecret, name: "clientSecret", parent: name, max: 64)
            try self.validate(self.clientSecret, name: "clientSecret", parent: name, min: 1)
            try self.validate(self.clientSecret, name: "clientSecret", parent: name, pattern: "^[\\w+]+$")
            try self.validate(self.token, name: "token", parent: name, pattern: "^[A-Za-z0-9-_=.]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case clientId = "ClientId"
            case clientSecret = "ClientSecret"
            case token = "Token"
        }
    }

    public struct RevokeTokenResponse: AWSDecodableShape {
        public init() {}
    }

    public struct RiskConfigurationType: AWSDecodableShape {
        /// The settings for automated responses and notification templates for adaptive authentication with threat protection.
        public let accountTakeoverRiskConfiguration: AccountTakeoverRiskConfigurationType?
        /// The app client where this configuration is applied. When this parameter isn't present, the risk configuration applies to all user pool app clients that don't have client-level settings.
        public let clientId: String?
        /// Settings for compromised-credentials actions and authentication types with threat protection in full-function ENFORCED mode.
        public let compromisedCredentialsRiskConfiguration: CompromisedCredentialsRiskConfigurationType?
        /// The date and time when the item was modified. Amazon Cognito returns this timestamp in UNIX epoch time format. Your SDK might render the output in a
        /// human-readable format like ISO 8601 or a Java Date object.
        public let lastModifiedDate: Date?
        /// Exceptions to the risk evaluation configuration, including always-allow and always-block IP address ranges.
        public let riskExceptionConfiguration: RiskExceptionConfigurationType?
        /// The ID of the user pool that has the risk configuration applied.
        public let userPoolId: String?

        @inlinable
        public init(accountTakeoverRiskConfiguration: AccountTakeoverRiskConfigurationType? = nil, clientId: String? = nil, compromisedCredentialsRiskConfiguration: CompromisedCredentialsRiskConfigurationType? = nil, lastModifiedDate: Date? = nil, riskExceptionConfiguration: RiskExceptionConfigurationType? = nil, userPoolId: String? = nil) {
            self.accountTakeoverRiskConfiguration = accountTakeoverRiskConfiguration
            self.clientId = clientId
            self.compromisedCredentialsRiskConfiguration = compromisedCredentialsRiskConfiguration
            self.lastModifiedDate = lastModifiedDate
            self.riskExceptionConfiguration = riskExceptionConfiguration
            self.userPoolId = userPoolId
        }

        private enum CodingKeys: String, CodingKey {
            case accountTakeoverRiskConfiguration = "AccountTakeoverRiskConfiguration"
            case clientId = "ClientId"
            case compromisedCredentialsRiskConfiguration = "CompromisedCredentialsRiskConfiguration"
            case lastModifiedDate = "LastModifiedDate"
            case riskExceptionConfiguration = "RiskExceptionConfiguration"
            case userPoolId = "UserPoolId"
        }
    }

    public struct RiskExceptionConfigurationType: AWSEncodableShape & AWSDecodableShape {
        /// An always-block IP address list. Overrides the risk decision and always blocks authentication requests. This parameter is displayed and set in CIDR notation.
        public let blockedIPRangeList: [String]?
        /// An always-allow IP address list. Risk detection isn't performed on the IP addresses in this range list. This parameter is displayed and set in CIDR notation.
        public let skippedIPRangeList: [String]?

        @inlinable
        public init(blockedIPRangeList: [String]? = nil, skippedIPRangeList: [String]? = nil) {
            self.blockedIPRangeList = blockedIPRangeList
            self.skippedIPRangeList = skippedIPRangeList
        }

        public func validate(name: String) throws {
            try self.blockedIPRangeList?.forEach {
                try validate($0, name: "blockedIPRangeList[]", parent: name, max: 131072)
            }
            try self.validate(self.blockedIPRangeList, name: "blockedIPRangeList", parent: name, max: 200)
            try self.skippedIPRangeList?.forEach {
                try validate($0, name: "skippedIPRangeList[]", parent: name, max: 131072)
            }
            try self.validate(self.skippedIPRangeList, name: "skippedIPRangeList", parent: name, max: 200)
        }

        private enum CodingKeys: String, CodingKey {
            case blockedIPRangeList = "BlockedIPRangeList"
            case skippedIPRangeList = "SkippedIPRangeList"
        }
    }

    public struct S3ConfigurationType: AWSEncodableShape & AWSDecodableShape {
        /// The ARN of an Amazon S3 bucket that's the destination for threat protection log export.
        public let bucketArn: String?

        @inlinable
        public init(bucketArn: String? = nil) {
            self.bucketArn = bucketArn
        }

        public func validate(name: String) throws {
            try self.validate(self.bucketArn, name: "bucketArn", parent: name, max: 1024)
            try self.validate(self.bucketArn, name: "bucketArn", parent: name, min: 3)
            try self.validate(self.bucketArn, name: "bucketArn", parent: name, pattern: "^arn:[\\w+=/,.@-]+:[\\w+=/,.@-]+:::[\\w+=/,.@-]+(:[\\w+=/,.@-]+)?(:[\\w+=/,.@-]+)?$")
        }

        private enum CodingKeys: String, CodingKey {
            case bucketArn = "BucketArn"
        }
    }

    public struct SMSMfaSettingsType: AWSEncodableShape {
        /// Specifies whether SMS message MFA is activated. If an MFA type is activated for a user, the user will be prompted for MFA during all sign-in attempts, unless device tracking is turned on and the device has been trusted.
        public let enabled: Bool?
        /// Specifies whether SMS is the preferred MFA method. If true, your user pool prompts the specified user for a code delivered by SMS message after username-password sign-in succeeds.
        public let preferredMfa: Bool?

        @inlinable
        public init(enabled: Bool? = nil, preferredMfa: Bool? = nil) {
            self.enabled = enabled
            self.preferredMfa = preferredMfa
        }

        private enum CodingKeys: String, CodingKey {
            case enabled = "Enabled"
            case preferredMfa = "PreferredMfa"
        }
    }

    public struct SchemaAttributeType: AWSEncodableShape & AWSDecodableShape {
        /// The data format of the values for your attribute. When you choose an AttributeDataType, Amazon Cognito validates the input against the data type. A custom attribute value in your user's ID token is always a string, for example "custom:isMember" : "true" or "custom:YearsAsMember" : "12".
        public let attributeDataType: AttributeDataType?
        ///  You should use WriteAttributes in the user pool client to control how attributes can be mutated for new use cases instead of using DeveloperOnlyAttribute.  Specifies whether the attribute type is developer only. This attribute can only be modified by an administrator. Users won't be able to modify this attribute using their access token. For example, DeveloperOnlyAttribute can be modified using AdminUpdateUserAttributes but can't be updated using UpdateUserAttributes.
        public let developerOnlyAttribute: Bool?
        /// Specifies whether the value of the attribute can be changed. Any user pool attribute whose value you map from an IdP attribute must be mutable, with a parameter value of true. Amazon Cognito updates mapped attributes when users sign in to your application through an IdP. If an attribute is immutable, Amazon Cognito throws an error when it attempts to update the attribute. For more information, see Specifying Identity Provider Attribute Mappings for Your User Pool.
        public let mutable: Bool?
        /// The name of your user pool attribute. When you create or update a user pool, adding a schema attribute creates a custom or developer-only attribute. When you add an attribute with a Name value of MyAttribute, Amazon Cognito creates the custom attribute custom:MyAttribute. When DeveloperOnlyAttribute is true, Amazon Cognito creates your attribute as dev:MyAttribute. In an operation that describes a user pool, Amazon Cognito returns this value as value for standard attributes, custom:value for custom attributes, and dev:value for developer-only attributes..
        public let name: String?
        /// Specifies the constraints for an attribute of the number type.
        public let numberAttributeConstraints: NumberAttributeConstraintsType?
        /// Specifies whether a user pool attribute is required. If the attribute is required and the user doesn't provide a value, registration or sign-in will fail.
        public let required: Bool?
        /// Specifies the constraints for an attribute of the string type.
        public let stringAttributeConstraints: StringAttributeConstraintsType?

        @inlinable
        public init(attributeDataType: AttributeDataType? = nil, developerOnlyAttribute: Bool? = nil, mutable: Bool? = nil, name: String? = nil, numberAttributeConstraints: NumberAttributeConstraintsType? = nil, required: Bool? = nil, stringAttributeConstraints: StringAttributeConstraintsType? = nil) {
            self.attributeDataType = attributeDataType
            self.developerOnlyAttribute = developerOnlyAttribute
            self.mutable = mutable
            self.name = name
            self.numberAttributeConstraints = numberAttributeConstraints
            self.required = required
            self.stringAttributeConstraints = stringAttributeConstraints
        }

        public func validate(name: String) throws {
            try self.validate(self.name, name: "name", parent: name, max: 20)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}]+$")
            try self.numberAttributeConstraints?.validate(name: "\(name).numberAttributeConstraints")
            try self.stringAttributeConstraints?.validate(name: "\(name).stringAttributeConstraints")
        }

        private enum CodingKeys: String, CodingKey {
            case attributeDataType = "AttributeDataType"
            case developerOnlyAttribute = "DeveloperOnlyAttribute"
            case mutable = "Mutable"
            case name = "Name"
            case numberAttributeConstraints = "NumberAttributeConstraints"
            case required = "Required"
            case stringAttributeConstraints = "StringAttributeConstraints"
        }
    }

    public struct SetLogDeliveryConfigurationRequest: AWSEncodableShape {
        /// A collection of the logging configurations for a user pool.
        public let logConfigurations: [LogConfigurationType]
        /// The ID of the user pool where you want to configure logging.
        public let userPoolId: String

        @inlinable
        public init(logConfigurations: [LogConfigurationType], userPoolId: String) {
            self.logConfigurations = logConfigurations
            self.userPoolId = userPoolId
        }

        public func validate(name: String) throws {
            try self.logConfigurations.forEach {
                try $0.validate(name: "\(name).logConfigurations[]")
            }
            try self.validate(self.logConfigurations, name: "logConfigurations", parent: name, max: 2)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, max: 55)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, min: 1)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, pattern: "^[\\w-]+_[0-9a-zA-Z]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case logConfigurations = "LogConfigurations"
            case userPoolId = "UserPoolId"
        }
    }

    public struct SetLogDeliveryConfigurationResponse: AWSDecodableShape {
        /// The logging configuration that you applied to the requested user pool.
        public let logDeliveryConfiguration: LogDeliveryConfigurationType?

        @inlinable
        public init(logDeliveryConfiguration: LogDeliveryConfigurationType? = nil) {
            self.logDeliveryConfiguration = logDeliveryConfiguration
        }

        private enum CodingKeys: String, CodingKey {
            case logDeliveryConfiguration = "LogDeliveryConfiguration"
        }
    }

    public struct SetRiskConfigurationRequest: AWSEncodableShape {
        /// The settings for automated responses and notification templates for adaptive authentication with threat protection.
        public let accountTakeoverRiskConfiguration: AccountTakeoverRiskConfigurationType?
        /// The ID of the app client where you want to set a risk configuration. If ClientId is null, then the risk configuration is mapped to UserPoolId. When the client ID is null, the same risk configuration is applied to all the clients in the userPool. When you include a ClientId parameter, Amazon Cognito maps the configuration to the app client. When you include both ClientId and UserPoolId, Amazon Cognito maps the configuration to the app client only.
        public let clientId: String?
        /// The configuration of automated reactions to detected compromised credentials. Includes settings for blocking future sign-in requests and for the types of password-submission events you want to monitor.
        public let compromisedCredentialsRiskConfiguration: CompromisedCredentialsRiskConfigurationType?
        /// A set of IP-address overrides to threat protection. You can set up IP-address always-block and always-allow lists.
        public let riskExceptionConfiguration: RiskExceptionConfigurationType?
        /// The ID of the user pool where you want to set a risk configuration. If you include UserPoolId in your request, don't include ClientId. When the client ID is null, the same risk configuration is applied to all the clients in the userPool. When you include both ClientId and UserPoolId, Amazon Cognito maps the configuration to the app client only.
        public let userPoolId: String

        @inlinable
        public init(accountTakeoverRiskConfiguration: AccountTakeoverRiskConfigurationType? = nil, clientId: String? = nil, compromisedCredentialsRiskConfiguration: CompromisedCredentialsRiskConfigurationType? = nil, riskExceptionConfiguration: RiskExceptionConfigurationType? = nil, userPoolId: String) {
            self.accountTakeoverRiskConfiguration = accountTakeoverRiskConfiguration
            self.clientId = clientId
            self.compromisedCredentialsRiskConfiguration = compromisedCredentialsRiskConfiguration
            self.riskExceptionConfiguration = riskExceptionConfiguration
            self.userPoolId = userPoolId
        }

        public func validate(name: String) throws {
            try self.accountTakeoverRiskConfiguration?.validate(name: "\(name).accountTakeoverRiskConfiguration")
            try self.validate(self.clientId, name: "clientId", parent: name, max: 128)
            try self.validate(self.clientId, name: "clientId", parent: name, min: 1)
            try self.validate(self.clientId, name: "clientId", parent: name, pattern: "^[\\w+]+$")
            try self.riskExceptionConfiguration?.validate(name: "\(name).riskExceptionConfiguration")
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, max: 55)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, min: 1)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, pattern: "^[\\w-]+_[0-9a-zA-Z]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case accountTakeoverRiskConfiguration = "AccountTakeoverRiskConfiguration"
            case clientId = "ClientId"
            case compromisedCredentialsRiskConfiguration = "CompromisedCredentialsRiskConfiguration"
            case riskExceptionConfiguration = "RiskExceptionConfiguration"
            case userPoolId = "UserPoolId"
        }
    }

    public struct SetRiskConfigurationResponse: AWSDecodableShape {
        /// The API response that contains the risk configuration that you set and the timestamp of the most recent change.
        public let riskConfiguration: RiskConfigurationType

        @inlinable
        public init(riskConfiguration: RiskConfigurationType) {
            self.riskConfiguration = riskConfiguration
        }

        private enum CodingKeys: String, CodingKey {
            case riskConfiguration = "RiskConfiguration"
        }
    }

    public struct SetUICustomizationRequest: AWSEncodableShape {
        /// The ID of the app client that you want to customize. To apply a default style to all app clients not configured with client-level branding, set this parameter value to ALL.
        public let clientId: String?
        /// A plaintext CSS file that contains the custom fields that you want to apply to your user pool or app client. To download a template, go to the Amazon Cognito console. Navigate to your user pool App clients tab, select Login pages, edit Hosted UI (classic) style, and select the link to CSS template.css.
        public let css: String?
        /// The image that you want to set as your login in the classic hosted UI, as a Base64-formatted binary object.
        public let imageFile: AWSBase64Data?
        /// The ID of the user pool where you want to apply branding to the classic hosted UI.
        public let userPoolId: String

        @inlinable
        public init(clientId: String? = nil, css: String? = nil, imageFile: AWSBase64Data? = nil, userPoolId: String) {
            self.clientId = clientId
            self.css = css
            self.imageFile = imageFile
            self.userPoolId = userPoolId
        }

        public func validate(name: String) throws {
            try self.validate(self.clientId, name: "clientId", parent: name, max: 128)
            try self.validate(self.clientId, name: "clientId", parent: name, min: 1)
            try self.validate(self.clientId, name: "clientId", parent: name, pattern: "^[\\w+]+$")
            try self.validate(self.css, name: "css", parent: name, max: 131072)
            try self.validate(self.imageFile, name: "imageFile", parent: name, max: 131072)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, max: 55)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, min: 1)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, pattern: "^[\\w-]+_[0-9a-zA-Z]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case clientId = "ClientId"
            case css = "CSS"
            case imageFile = "ImageFile"
            case userPoolId = "UserPoolId"
        }
    }

    public struct SetUICustomizationResponse: AWSDecodableShape {
        /// Information about the hosted UI branding that you applied.
        public let uiCustomization: UICustomizationType

        @inlinable
        public init(uiCustomization: UICustomizationType) {
            self.uiCustomization = uiCustomization
        }

        private enum CodingKeys: String, CodingKey {
            case uiCustomization = "UICustomization"
        }
    }

    public struct SetUserMFAPreferenceRequest: AWSEncodableShape {
        /// A valid access token that Amazon Cognito issued to the currently signed-in user. Must include a scope claim for
        /// aws.cognito.signin.user.admin.
        public let accessToken: String
        /// User preferences for email message MFA. Activates or deactivates email MFA and sets it as the preferred MFA method when multiple methods are available. To activate this setting, your user pool must be in the  Essentials tier or higher.
        public let emailMfaSettings: EmailMfaSettingsType?
        /// User preferences for SMS message MFA. Activates or deactivates SMS MFA and sets it as the preferred MFA method when multiple methods are available.
        public let smsMfaSettings: SMSMfaSettingsType?
        /// User preferences for time-based one-time password (TOTP) MFA. Activates or deactivates TOTP MFA and sets it as the preferred MFA method when multiple methods are available. Users must register a TOTP authenticator before they set this as their preferred MFA method.
        public let softwareTokenMfaSettings: SoftwareTokenMfaSettingsType?

        @inlinable
        public init(accessToken: String, emailMfaSettings: EmailMfaSettingsType? = nil, smsMfaSettings: SMSMfaSettingsType? = nil, softwareTokenMfaSettings: SoftwareTokenMfaSettingsType? = nil) {
            self.accessToken = accessToken
            self.emailMfaSettings = emailMfaSettings
            self.smsMfaSettings = smsMfaSettings
            self.softwareTokenMfaSettings = softwareTokenMfaSettings
        }

        public func validate(name: String) throws {
            try self.validate(self.accessToken, name: "accessToken", parent: name, pattern: "^[A-Za-z0-9-_=.]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case accessToken = "AccessToken"
            case emailMfaSettings = "EmailMfaSettings"
            case smsMfaSettings = "SMSMfaSettings"
            case softwareTokenMfaSettings = "SoftwareTokenMfaSettings"
        }
    }

    public struct SetUserMFAPreferenceResponse: AWSDecodableShape {
        public init() {}
    }

    public struct SetUserPoolMfaConfigRequest: AWSEncodableShape {
        /// Sets configuration for user pool email message MFA and sign-in with one-time passwords (OTPs). Includes the subject and body of the email message template for sign-in and MFA messages. To activate this setting, your user pool must be in the  Essentials tier or higher.
        public let emailMfaConfiguration: EmailMfaConfigType?
        /// Sets multi-factor authentication (MFA) to be on, off, or optional. When ON, all users must set up MFA before they can sign in. When OPTIONAL, your application must make a client-side determination of whether a user wants to register an MFA device. For user pools with adaptive authentication with threat protection, choose OPTIONAL. When MfaConfiguration is OPTIONAL, managed login doesn't automatically prompt users to set up MFA. Amazon Cognito generates MFA prompts in API responses and in managed login for users who have chosen and configured a preferred MFA factor.
        public let mfaConfiguration: UserPoolMfaType?
        /// Configures user pool SMS messages for MFA. Sets the message template and the SMS message sending configuration for Amazon SNS.
        public let smsMfaConfiguration: SmsMfaConfigType?
        /// Configures a user pool for time-based one-time password (TOTP) MFA. Enables or disables TOTP.
        public let softwareTokenMfaConfiguration: SoftwareTokenMfaConfigType?
        /// The user pool ID.
        public let userPoolId: String
        /// The configuration of your user pool for passkey, or WebAuthn, authentication and registration. You can set this configuration independent of the MFA configuration options in this operation.
        public let webAuthnConfiguration: WebAuthnConfigurationType?

        @inlinable
        public init(emailMfaConfiguration: EmailMfaConfigType? = nil, mfaConfiguration: UserPoolMfaType? = nil, smsMfaConfiguration: SmsMfaConfigType? = nil, softwareTokenMfaConfiguration: SoftwareTokenMfaConfigType? = nil, userPoolId: String, webAuthnConfiguration: WebAuthnConfigurationType? = nil) {
            self.emailMfaConfiguration = emailMfaConfiguration
            self.mfaConfiguration = mfaConfiguration
            self.smsMfaConfiguration = smsMfaConfiguration
            self.softwareTokenMfaConfiguration = softwareTokenMfaConfiguration
            self.userPoolId = userPoolId
            self.webAuthnConfiguration = webAuthnConfiguration
        }

        public func validate(name: String) throws {
            try self.emailMfaConfiguration?.validate(name: "\(name).emailMfaConfiguration")
            try self.smsMfaConfiguration?.validate(name: "\(name).smsMfaConfiguration")
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, max: 55)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, min: 1)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, pattern: "^[\\w-]+_[0-9a-zA-Z]+$")
            try self.webAuthnConfiguration?.validate(name: "\(name).webAuthnConfiguration")
        }

        private enum CodingKeys: String, CodingKey {
            case emailMfaConfiguration = "EmailMfaConfiguration"
            case mfaConfiguration = "MfaConfiguration"
            case smsMfaConfiguration = "SmsMfaConfiguration"
            case softwareTokenMfaConfiguration = "SoftwareTokenMfaConfiguration"
            case userPoolId = "UserPoolId"
            case webAuthnConfiguration = "WebAuthnConfiguration"
        }
    }

    public struct SetUserPoolMfaConfigResponse: AWSDecodableShape {
        /// Shows configuration for user pool email message MFA and sign-in with one-time passwords (OTPs). Includes the subject and body of the email message template for sign-in and MFA messages. To activate this setting, your user pool must be in the  Essentials tier or higher.
        public let emailMfaConfiguration: EmailMfaConfigType?
        /// Displays multi-factor authentication (MFA) as on, off, or optional. When ON, all users must set up MFA before they can sign in. When OPTIONAL, your application must make a client-side determination of whether a user wants to register an MFA device. For user pools with adaptive authentication with threat protection, choose OPTIONAL. When MfaConfiguration is OPTIONAL, managed login doesn't automatically prompt users to set up MFA. Amazon Cognito generates MFA prompts in API responses and in managed login for users who have chosen and configured a preferred MFA factor.
        public let mfaConfiguration: UserPoolMfaType?
        /// Shows user pool SMS message configuration for MFA and sign-in with SMS-message OTPs. Includes the message template and the SMS message sending configuration for Amazon SNS.
        public let smsMfaConfiguration: SmsMfaConfigType?
        /// Shows user pool configuration for time-based one-time password (TOTP) MFA. Includes TOTP enabled or disabled state.
        public let softwareTokenMfaConfiguration: SoftwareTokenMfaConfigType?
        /// The configuration of your user pool for passkey, or WebAuthn, sign-in with authenticators like biometric and security-key devices. Includes relying-party configuration and settings for user-verification requirements.
        public let webAuthnConfiguration: WebAuthnConfigurationType?

        @inlinable
        public init(emailMfaConfiguration: EmailMfaConfigType? = nil, mfaConfiguration: UserPoolMfaType? = nil, smsMfaConfiguration: SmsMfaConfigType? = nil, softwareTokenMfaConfiguration: SoftwareTokenMfaConfigType? = nil, webAuthnConfiguration: WebAuthnConfigurationType? = nil) {
            self.emailMfaConfiguration = emailMfaConfiguration
            self.mfaConfiguration = mfaConfiguration
            self.smsMfaConfiguration = smsMfaConfiguration
            self.softwareTokenMfaConfiguration = softwareTokenMfaConfiguration
            self.webAuthnConfiguration = webAuthnConfiguration
        }

        private enum CodingKeys: String, CodingKey {
            case emailMfaConfiguration = "EmailMfaConfiguration"
            case mfaConfiguration = "MfaConfiguration"
            case smsMfaConfiguration = "SmsMfaConfiguration"
            case softwareTokenMfaConfiguration = "SoftwareTokenMfaConfiguration"
            case webAuthnConfiguration = "WebAuthnConfiguration"
        }
    }

    public struct SetUserSettingsRequest: AWSEncodableShape {
        /// A valid access token that Amazon Cognito issued to the currently signed-in user. Must include a scope claim for
        /// aws.cognito.signin.user.admin.
        public let accessToken: String
        /// You can use this parameter only to set an SMS configuration that uses SMS for delivery.
        public let mfaOptions: [MFAOptionType]

        @inlinable
        public init(accessToken: String, mfaOptions: [MFAOptionType]) {
            self.accessToken = accessToken
            self.mfaOptions = mfaOptions
        }

        public func validate(name: String) throws {
            try self.validate(self.accessToken, name: "accessToken", parent: name, pattern: "^[A-Za-z0-9-_=.]+$")
            try self.mfaOptions.forEach {
                try $0.validate(name: "\(name).mfaOptions[]")
            }
        }

        private enum CodingKeys: String, CodingKey {
            case accessToken = "AccessToken"
            case mfaOptions = "MFAOptions"
        }
    }

    public struct SetUserSettingsResponse: AWSDecodableShape {
        public init() {}
    }

    public struct SignInPolicyType: AWSEncodableShape & AWSDecodableShape {
        /// The sign-in methods that a user pool supports as the first factor. You can permit users to start authentication with a standard username and password, or with other one-time password and hardware factors.
        public let allowedFirstAuthFactors: [AuthFactorType]?

        @inlinable
        public init(allowedFirstAuthFactors: [AuthFactorType]? = nil) {
            self.allowedFirstAuthFactors = allowedFirstAuthFactors
        }

        public func validate(name: String) throws {
            try self.validate(self.allowedFirstAuthFactors, name: "allowedFirstAuthFactors", parent: name, max: 4)
            try self.validate(self.allowedFirstAuthFactors, name: "allowedFirstAuthFactors", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case allowedFirstAuthFactors = "AllowedFirstAuthFactors"
        }
    }

    public struct SignUpRequest: AWSEncodableShape {
        /// Information that supports analytics outcomes with Amazon Pinpoint, including the
        /// user's endpoint ID. The endpoint ID is a destination for Amazon Pinpoint push notifications, for example a device identifier,
        /// email address, or phone number.
        public let analyticsMetadata: AnalyticsMetadataType?
        /// The ID of the app client where the user wants to sign up.
        public let clientId: String
        /// A map of custom key-value pairs that you can provide as input for any custom workflows that this action triggers. You create custom workflows by assigning Lambda functions to user pool triggers. When you use the SignUp API action, Amazon Cognito invokes any functions that are assigned to the following triggers: pre sign-up, custom message, and post confirmation. When Amazon Cognito invokes any of these functions, it passes a JSON payload, which the function receives as input. This payload contains a clientMetadata attribute, which provides the data that you assigned to the ClientMetadata parameter in your SignUp request. In your function code in Lambda, you can process the clientMetadata value to enhance your workflow for your specific needs. For more information, see
        /// Using Lambda triggers in the Amazon Cognito Developer Guide.  When you use the ClientMetadata parameter, note that Amazon Cognito won't do the following:   Store the ClientMetadata value. This data is available only to Lambda triggers that are assigned to a user pool to support custom workflows. If your user pool configuration doesn't include triggers, the ClientMetadata parameter serves no purpose.   Validate the ClientMetadata value.   Encrypt the ClientMetadata value. Don't send sensitive information in this parameter.
        public let clientMetadata: [String: String]?
        /// The user's proposed password. The password must comply with the password requirements of your user pool. Users can sign up without a password when your user pool supports passwordless sign-in with email or SMS OTPs. To create a user with no password, omit this parameter or submit a blank value. You can only create a passwordless user when passwordless sign-in is available.
        public let password: String?
        /// A keyed-hash message authentication code (HMAC) calculated using the secret key of a user pool client and username plus the client ID in the message. For more information about SecretHash, see Computing secret hash values.
        public let secretHash: String?
        /// An array of name-value pairs representing user attributes. For custom attributes, include a custom: prefix in the attribute name, for example custom:department.
        public let userAttributes: [AttributeType]?
        /// Contextual data about your user session like the device fingerprint, IP address, or location. Amazon Cognito threat
        /// protection evaluates the risk of an authentication event based on the context that your app generates and passes to Amazon Cognito
        /// when it makes API requests. For more information, see Collecting data for threat protection in
        /// applications.
        public let userContextData: UserContextDataType?
        /// The username of the user that you want to sign up. The value of this parameter is typically a username, but can be any alias attribute in your user pool.
        public let username: String
        /// Temporary user attributes that contribute to the outcomes of your pre sign-up Lambda trigger. This set of key-value pairs are for custom validation of information that you  collect from your users but don't need to retain. Your Lambda function can analyze this additional data and act on it. Your function can automatically confirm and verify select users or perform external API operations  like logging user attributes and validation data to Amazon CloudWatch Logs. For more information about the pre sign-up Lambda trigger, see Pre sign-up Lambda trigger.
        public let validationData: [AttributeType]?

        @inlinable
        public init(analyticsMetadata: AnalyticsMetadataType? = nil, clientId: String, clientMetadata: [String: String]? = nil, password: String? = nil, secretHash: String? = nil, userAttributes: [AttributeType]? = nil, userContextData: UserContextDataType? = nil, username: String, validationData: [AttributeType]? = nil) {
            self.analyticsMetadata = analyticsMetadata
            self.clientId = clientId
            self.clientMetadata = clientMetadata
            self.password = password
            self.secretHash = secretHash
            self.userAttributes = userAttributes
            self.userContextData = userContextData
            self.username = username
            self.validationData = validationData
        }

        public func validate(name: String) throws {
            try self.analyticsMetadata?.validate(name: "\(name).analyticsMetadata")
            try self.validate(self.clientId, name: "clientId", parent: name, max: 128)
            try self.validate(self.clientId, name: "clientId", parent: name, min: 1)
            try self.validate(self.clientId, name: "clientId", parent: name, pattern: "^[\\w+]+$")
            try self.clientMetadata?.forEach {
                try validate($0.key, name: "clientMetadata.key", parent: name, max: 131072)
                try validate($0.value, name: "clientMetadata[\"\($0.key)\"]", parent: name, max: 131072)
            }
            try self.validate(self.password, name: "password", parent: name, max: 256)
            try self.validate(self.password, name: "password", parent: name, pattern: "^[\\S]+$")
            try self.validate(self.secretHash, name: "secretHash", parent: name, max: 128)
            try self.validate(self.secretHash, name: "secretHash", parent: name, min: 1)
            try self.validate(self.secretHash, name: "secretHash", parent: name, pattern: "^[\\w+=/]+$")
            try self.userAttributes?.forEach {
                try $0.validate(name: "\(name).userAttributes[]")
            }
            try self.userContextData?.validate(name: "\(name).userContextData")
            try self.validate(self.username, name: "username", parent: name, max: 128)
            try self.validate(self.username, name: "username", parent: name, min: 1)
            try self.validate(self.username, name: "username", parent: name, pattern: "^[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}]+$")
            try self.validationData?.forEach {
                try $0.validate(name: "\(name).validationData[]")
            }
        }

        private enum CodingKeys: String, CodingKey {
            case analyticsMetadata = "AnalyticsMetadata"
            case clientId = "ClientId"
            case clientMetadata = "ClientMetadata"
            case password = "Password"
            case secretHash = "SecretHash"
            case userAttributes = "UserAttributes"
            case userContextData = "UserContextData"
            case username = "Username"
            case validationData = "ValidationData"
        }
    }

    public struct SignUpResponse: AWSDecodableShape {
        /// In user pools that automatically verify and confirm new users, Amazon Cognito sends users a message with a code or link that confirms ownership of the phone number or email address that they entered. The CodeDeliveryDetails object is information about the delivery destination for that link or code.
        public let codeDeliveryDetails: CodeDeliveryDetailsType?
        /// A session Id that you can pass to ConfirmSignUp when you want to immediately sign in your user with the USER_AUTH flow after they complete sign-up.
        public let session: String?
        /// Indicates whether the user was automatically confirmed. You can auto-confirm users with a pre sign-up Lambda trigger.
        public let userConfirmed: Bool
        /// The unique identifier of the new user, for example a1b2c3d4-5678-90ab-cdef-EXAMPLE11111.
        public let userSub: String

        @inlinable
        public init(codeDeliveryDetails: CodeDeliveryDetailsType? = nil, session: String? = nil, userConfirmed: Bool, userSub: String) {
            self.codeDeliveryDetails = codeDeliveryDetails
            self.session = session
            self.userConfirmed = userConfirmed
            self.userSub = userSub
        }

        private enum CodingKeys: String, CodingKey {
            case codeDeliveryDetails = "CodeDeliveryDetails"
            case session = "Session"
            case userConfirmed = "UserConfirmed"
            case userSub = "UserSub"
        }
    }

    public struct SmsConfigurationType: AWSEncodableShape & AWSDecodableShape {
        /// The external ID provides additional security for your IAM role. You can use an ExternalId with the IAM role that you use with Amazon SNS to send SMS messages for your user pool. If you provide an ExternalId, your Amazon Cognito user pool includes it in the request to assume your IAM role. You can configure the role trust policy to require that Amazon Cognito, and any principal, provide the ExternalID. If you use the Amazon Cognito Management Console to create a role for SMS multi-factor authentication (MFA), Amazon Cognito creates a role with the required permissions and a trust policy that demonstrates use of the ExternalId. For more information about the ExternalId of a role, see How to use an external ID when granting access to your Amazon Web Services resources to a third party.
        public let externalId: String?
        /// The Amazon Resource Name (ARN) of the Amazon SNS caller. This is the ARN of the IAM role in your Amazon Web Services account that Amazon Cognito will use to send SMS messages. SMS messages are subject to a spending limit.
        public let snsCallerArn: String
        /// The Amazon Web Services Region to use with Amazon SNS integration. You can choose the same Region as your user pool, or a supported Legacy Amazon SNS alternate Region.   Amazon Cognito resources in the Asia Pacific (Seoul) Amazon Web Services Region must use your Amazon SNS configuration in the Asia Pacific (Tokyo) Region. For more information, see SMS message settings for Amazon Cognito user pools.
        public let snsRegion: String?

        @inlinable
        public init(externalId: String? = nil, snsCallerArn: String, snsRegion: String? = nil) {
            self.externalId = externalId
            self.snsCallerArn = snsCallerArn
            self.snsRegion = snsRegion
        }

        public func validate(name: String) throws {
            try self.validate(self.externalId, name: "externalId", parent: name, max: 131072)
            try self.validate(self.snsCallerArn, name: "snsCallerArn", parent: name, max: 2048)
            try self.validate(self.snsCallerArn, name: "snsCallerArn", parent: name, min: 20)
            try self.validate(self.snsCallerArn, name: "snsCallerArn", parent: name, pattern: "^arn:[\\w+=/,.@-]+:[\\w+=/,.@-]+:([\\w+=/,.@-]*)?:[0-9]+:[\\w+=/,.@-]+(:[\\w+=/,.@-]+)?(:[\\w+=/,.@-]+)?$")
            try self.validate(self.snsRegion, name: "snsRegion", parent: name, max: 32)
            try self.validate(self.snsRegion, name: "snsRegion", parent: name, min: 5)
        }

        private enum CodingKeys: String, CodingKey {
            case externalId = "ExternalId"
            case snsCallerArn = "SnsCallerArn"
            case snsRegion = "SnsRegion"
        }
    }

    public struct SmsMfaConfigType: AWSEncodableShape & AWSDecodableShape {
        /// The SMS authentication message that will be sent to users with the code they must sign in with. The message must contain the {####} placeholder. Your user pool replaces the placeholder with the MFA code. If this parameter isn't provided, your user pool sends a default message.
        public let smsAuthenticationMessage: String?
        /// User pool configuration for delivery of SMS messages with Amazon Simple Notification Service. To send SMS messages with Amazon SNS in the Amazon Web Services Region that you want, the Amazon Cognito user pool uses an Identity and Access Management (IAM) role in your Amazon Web Services account. You can set SmsConfiguration in CreateUserPool and  UpdateUserPool, or in SetUserPoolMfaConfig.
        public let smsConfiguration: SmsConfigurationType?

        @inlinable
        public init(smsAuthenticationMessage: String? = nil, smsConfiguration: SmsConfigurationType? = nil) {
            self.smsAuthenticationMessage = smsAuthenticationMessage
            self.smsConfiguration = smsConfiguration
        }

        public func validate(name: String) throws {
            try self.validate(self.smsAuthenticationMessage, name: "smsAuthenticationMessage", parent: name, max: 140)
            try self.validate(self.smsAuthenticationMessage, name: "smsAuthenticationMessage", parent: name, min: 6)
            try self.validate(self.smsAuthenticationMessage, name: "smsAuthenticationMessage", parent: name, pattern: "\\{####\\}")
            try self.smsConfiguration?.validate(name: "\(name).smsConfiguration")
        }

        private enum CodingKeys: String, CodingKey {
            case smsAuthenticationMessage = "SmsAuthenticationMessage"
            case smsConfiguration = "SmsConfiguration"
        }
    }

    public struct SoftwareTokenMfaConfigType: AWSEncodableShape & AWSDecodableShape {
        /// The activation state of TOTP MFA.
        public let enabled: Bool?

        @inlinable
        public init(enabled: Bool? = nil) {
            self.enabled = enabled
        }

        private enum CodingKeys: String, CodingKey {
            case enabled = "Enabled"
        }
    }

    public struct SoftwareTokenMfaSettingsType: AWSEncodableShape {
        /// Specifies whether software token MFA is activated. If an MFA type is activated for a user, the user will be prompted for MFA during all sign-in attempts, unless device tracking is turned on and the device has been trusted.
        public let enabled: Bool?
        /// Specifies whether software token MFA is the preferred MFA method.
        public let preferredMfa: Bool?

        @inlinable
        public init(enabled: Bool? = nil, preferredMfa: Bool? = nil) {
            self.enabled = enabled
            self.preferredMfa = preferredMfa
        }

        private enum CodingKeys: String, CodingKey {
            case enabled = "Enabled"
            case preferredMfa = "PreferredMfa"
        }
    }

    public struct StartUserImportJobRequest: AWSEncodableShape {
        /// The ID of a user import job that you previously created.
        public let jobId: String
        /// The ID of the user pool that you want to start importing users into.
        public let userPoolId: String

        @inlinable
        public init(jobId: String, userPoolId: String) {
            self.jobId = jobId
            self.userPoolId = userPoolId
        }

        public func validate(name: String) throws {
            try self.validate(self.jobId, name: "jobId", parent: name, max: 55)
            try self.validate(self.jobId, name: "jobId", parent: name, min: 1)
            try self.validate(self.jobId, name: "jobId", parent: name, pattern: "^import-[0-9a-zA-Z-]+$")
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, max: 55)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, min: 1)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, pattern: "^[\\w-]+_[0-9a-zA-Z]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case jobId = "JobId"
            case userPoolId = "UserPoolId"
        }
    }

    public struct StartUserImportJobResponse: AWSDecodableShape {
        /// The details of the user import job. Includes logging destination, status, and the Amazon S3 pre-signed URL for CSV upload.
        public let userImportJob: UserImportJobType?

        @inlinable
        public init(userImportJob: UserImportJobType? = nil) {
            self.userImportJob = userImportJob
        }

        private enum CodingKeys: String, CodingKey {
            case userImportJob = "UserImportJob"
        }
    }

    public struct StartWebAuthnRegistrationRequest: AWSEncodableShape {
        /// A valid access token that Amazon Cognito issued to the currently signed-in user. Must include a scope claim for
        /// aws.cognito.signin.user.admin.
        public let accessToken: String

        @inlinable
        public init(accessToken: String) {
            self.accessToken = accessToken
        }

        public func validate(name: String) throws {
            try self.validate(self.accessToken, name: "accessToken", parent: name, pattern: "^[A-Za-z0-9-_=.]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case accessToken = "AccessToken"
        }
    }

    public struct StartWebAuthnRegistrationResponse: AWSDecodableShape {
        /// The information that a user can provide in their request to register with their passkey provider.
        public let credentialCreationOptions: AWSDocument

        @inlinable
        public init(credentialCreationOptions: AWSDocument) {
            self.credentialCreationOptions = credentialCreationOptions
        }

        private enum CodingKeys: String, CodingKey {
            case credentialCreationOptions = "CredentialCreationOptions"
        }
    }

    public struct StopUserImportJobRequest: AWSEncodableShape {
        /// The ID of a running user import job.
        public let jobId: String
        /// The ID of the user pool that you want to stop.
        public let userPoolId: String

        @inlinable
        public init(jobId: String, userPoolId: String) {
            self.jobId = jobId
            self.userPoolId = userPoolId
        }

        public func validate(name: String) throws {
            try self.validate(self.jobId, name: "jobId", parent: name, max: 55)
            try self.validate(self.jobId, name: "jobId", parent: name, min: 1)
            try self.validate(self.jobId, name: "jobId", parent: name, pattern: "^import-[0-9a-zA-Z-]+$")
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, max: 55)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, min: 1)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, pattern: "^[\\w-]+_[0-9a-zA-Z]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case jobId = "JobId"
            case userPoolId = "UserPoolId"
        }
    }

    public struct StopUserImportJobResponse: AWSDecodableShape {
        /// The details of the user import job. Includes logging destination, status, and the Amazon S3 pre-signed URL for CSV upload.
        public let userImportJob: UserImportJobType?

        @inlinable
        public init(userImportJob: UserImportJobType? = nil) {
            self.userImportJob = userImportJob
        }

        private enum CodingKeys: String, CodingKey {
            case userImportJob = "UserImportJob"
        }
    }

    public struct StringAttributeConstraintsType: AWSEncodableShape & AWSDecodableShape {
        /// The maximum length of a string attribute value. Must be a number less than or equal to 2^1023, represented as a string with a length of 131072 characters or fewer.
        public let maxLength: String?
        /// The minimum length of a string attribute value.
        public let minLength: String?

        @inlinable
        public init(maxLength: String? = nil, minLength: String? = nil) {
            self.maxLength = maxLength
            self.minLength = minLength
        }

        public func validate(name: String) throws {
            try self.validate(self.maxLength, name: "maxLength", parent: name, max: 131072)
            try self.validate(self.minLength, name: "minLength", parent: name, max: 131072)
        }

        private enum CodingKeys: String, CodingKey {
            case maxLength = "MaxLength"
            case minLength = "MinLength"
        }
    }

    public struct TagResourceRequest: AWSEncodableShape {
        /// The Amazon Resource Name (ARN) of the user pool to assign the tags to.
        public let resourceArn: String
        /// An array of tag keys and values that you want to assign to the user pool.
        public let tags: [String: String]

        @inlinable
        public init(resourceArn: String, tags: [String: String]) {
            self.resourceArn = resourceArn
            self.tags = tags
        }

        public func validate(name: String) throws {
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, max: 2048)
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, min: 20)
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, pattern: "^arn:[\\w+=/,.@-]+:[\\w+=/,.@-]+:([\\w+=/,.@-]*)?:[0-9]+:[\\w+=/,.@-]+(:[\\w+=/,.@-]+)?(:[\\w+=/,.@-]+)?$")
            try self.tags.forEach {
                try validate($0.key, name: "tags.key", parent: name, max: 128)
                try validate($0.key, name: "tags.key", parent: name, min: 1)
                try validate($0.value, name: "tags[\"\($0.key)\"]", parent: name, max: 256)
            }
        }

        private enum CodingKeys: String, CodingKey {
            case resourceArn = "ResourceArn"
            case tags = "Tags"
        }
    }

    public struct TagResourceResponse: AWSDecodableShape {
        public init() {}
    }

    public struct TermsDescriptionType: AWSDecodableShape {
        /// The date and time when the item was created. Amazon Cognito returns this timestamp in UNIX epoch time format. Your SDK might render the output in a
        /// human-readable format like ISO 8601 or a Java Date object.
        public let creationDate: Date
        /// This parameter is reserved for future use and currently accepts one value.
        public let enforcement: TermsEnforcementType
        /// The date and time when the item was modified. Amazon Cognito returns this timestamp in UNIX epoch time format. Your SDK might render the output in a
        /// human-readable format like ISO 8601 or a Java Date object.
        public let lastModifiedDate: Date
        /// The ID of the requested terms documents.
        public let termsId: String
        /// The type and friendly name of the requested terms documents.
        public let termsName: String

        @inlinable
        public init(creationDate: Date, enforcement: TermsEnforcementType, lastModifiedDate: Date, termsId: String, termsName: String) {
            self.creationDate = creationDate
            self.enforcement = enforcement
            self.lastModifiedDate = lastModifiedDate
            self.termsId = termsId
            self.termsName = termsName
        }

        private enum CodingKeys: String, CodingKey {
            case creationDate = "CreationDate"
            case enforcement = "Enforcement"
            case lastModifiedDate = "LastModifiedDate"
            case termsId = "TermsId"
            case termsName = "TermsName"
        }
    }

    public struct TermsType: AWSDecodableShape {
        /// The ID of the app client that the terms documents are assigned to.
        public let clientId: String
        /// The date and time when the item was created. Amazon Cognito returns this timestamp in UNIX epoch time format. Your SDK might render the output in a
        /// human-readable format like ISO 8601 or a Java Date object.
        public let creationDate: Date
        /// This parameter is reserved for future use and currently accepts one value.
        public let enforcement: TermsEnforcementType
        /// The date and time when the item was modified. Amazon Cognito returns this timestamp in UNIX epoch time format. Your SDK might render the output in a
        /// human-readable format like ISO 8601 or a Java Date object.
        public let lastModifiedDate: Date
        /// A map of URLs to languages. For each localized language that will view the requested TermsName, assign a URL. A selection of cognito:default displays for all languages that don't have a language-specific URL. For example, "cognito:default": "https://terms.example.com", "cognito:spanish": "https://terms.example.com/es".
        public let links: [String: String]
        /// The ID of the terms documents.
        public let termsId: String
        /// The type and friendly name of the terms documents.
        public let termsName: String
        /// This parameter is reserved for future use and currently accepts one value.
        public let termsSource: TermsSourceType
        /// The ID of the user pool that contains the terms documents.
        public let userPoolId: String

        @inlinable
        public init(clientId: String, creationDate: Date, enforcement: TermsEnforcementType, lastModifiedDate: Date, links: [String: String], termsId: String, termsName: String, termsSource: TermsSourceType, userPoolId: String) {
            self.clientId = clientId
            self.creationDate = creationDate
            self.enforcement = enforcement
            self.lastModifiedDate = lastModifiedDate
            self.links = links
            self.termsId = termsId
            self.termsName = termsName
            self.termsSource = termsSource
            self.userPoolId = userPoolId
        }

        private enum CodingKeys: String, CodingKey {
            case clientId = "ClientId"
            case creationDate = "CreationDate"
            case enforcement = "Enforcement"
            case lastModifiedDate = "LastModifiedDate"
            case links = "Links"
            case termsId = "TermsId"
            case termsName = "TermsName"
            case termsSource = "TermsSource"
            case userPoolId = "UserPoolId"
        }
    }

    public struct TokenValidityUnitsType: AWSEncodableShape & AWSDecodableShape {
        ///  A time unit for the value that you set in the AccessTokenValidity parameter. The default AccessTokenValidity time unit is hours. AccessTokenValidity duration can range from five minutes to one day.
        public let accessToken: TimeUnitsType?
        /// A time unit for the value that you set in the IdTokenValidity parameter. The default IdTokenValidity time unit is hours. IdTokenValidity duration can range from five minutes to one day.
        public let idToken: TimeUnitsType?
        /// A time unit for the value that you set in the RefreshTokenValidity parameter. The default RefreshTokenValidity time unit is days. RefreshTokenValidity duration can range from 60 minutes to 10 years.
        public let refreshToken: TimeUnitsType?

        @inlinable
        public init(accessToken: TimeUnitsType? = nil, idToken: TimeUnitsType? = nil, refreshToken: TimeUnitsType? = nil) {
            self.accessToken = accessToken
            self.idToken = idToken
            self.refreshToken = refreshToken
        }

        private enum CodingKeys: String, CodingKey {
            case accessToken = "AccessToken"
            case idToken = "IdToken"
            case refreshToken = "RefreshToken"
        }
    }

    public struct UICustomizationType: AWSDecodableShape {
        /// The app client ID for your UI customization. When this value isn't present, the customization applies to all user pool app clients that don't have client-level settings..
        public let clientId: String?
        /// The date and time when the item was created. Amazon Cognito returns this timestamp in UNIX epoch time format. Your SDK might render the output in a
        /// human-readable format like ISO 8601 or a Java Date object.
        public let creationDate: Date?
        /// The CSS values in the UI customization.
        public let css: String?
        /// The CSS version number.
        public let cssVersion: String?
        /// A URL path to the hosted logo image of your UI customization.
        public let imageUrl: String?
        /// The date and time when the item was modified. Amazon Cognito returns this timestamp in UNIX epoch time format. Your SDK might render the output in a
        /// human-readable format like ISO 8601 or a Java Date object.
        public let lastModifiedDate: Date?
        /// The ID of the user pool with hosted UI customizations.
        public let userPoolId: String?

        @inlinable
        public init(clientId: String? = nil, creationDate: Date? = nil, css: String? = nil, cssVersion: String? = nil, imageUrl: String? = nil, lastModifiedDate: Date? = nil, userPoolId: String? = nil) {
            self.clientId = clientId
            self.creationDate = creationDate
            self.css = css
            self.cssVersion = cssVersion
            self.imageUrl = imageUrl
            self.lastModifiedDate = lastModifiedDate
            self.userPoolId = userPoolId
        }

        private enum CodingKeys: String, CodingKey {
            case clientId = "ClientId"
            case creationDate = "CreationDate"
            case css = "CSS"
            case cssVersion = "CSSVersion"
            case imageUrl = "ImageUrl"
            case lastModifiedDate = "LastModifiedDate"
            case userPoolId = "UserPoolId"
        }
    }

    public struct UntagResourceRequest: AWSEncodableShape {
        /// The Amazon Resource Name (ARN) of the user pool that the tags are assigned to.
        public let resourceArn: String
        /// An array of tag keys that you want to remove from the user pool.
        public let tagKeys: [String]

        @inlinable
        public init(resourceArn: String, tagKeys: [String]) {
            self.resourceArn = resourceArn
            self.tagKeys = tagKeys
        }

        public func validate(name: String) throws {
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, max: 2048)
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, min: 20)
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, pattern: "^arn:[\\w+=/,.@-]+:[\\w+=/,.@-]+:([\\w+=/,.@-]*)?:[0-9]+:[\\w+=/,.@-]+(:[\\w+=/,.@-]+)?(:[\\w+=/,.@-]+)?$")
            try self.tagKeys.forEach {
                try validate($0, name: "tagKeys[]", parent: name, max: 128)
                try validate($0, name: "tagKeys[]", parent: name, min: 1)
            }
        }

        private enum CodingKeys: String, CodingKey {
            case resourceArn = "ResourceArn"
            case tagKeys = "TagKeys"
        }
    }

    public struct UntagResourceResponse: AWSDecodableShape {
        public init() {}
    }

    public struct UpdateAuthEventFeedbackRequest: AWSEncodableShape {
        /// The ID of the authentication event that you want to submit feedback for.
        public let eventId: String
        /// The feedback token, an encrypted object generated by Amazon Cognito and passed to your user in the notification email message from the event.
        public let feedbackToken: String
        /// Your feedback to the authentication event. When you provide a FeedbackValue
        /// value of valid, you tell Amazon Cognito that you trust a user session where Amazon Cognito
        /// has evaluated some level of risk. When you provide a FeedbackValue value of
        /// invalid, you tell Amazon Cognito that you don't trust a user session, or you
        /// don't believe that Amazon Cognito evaluated a high-enough risk level.
        public let feedbackValue: FeedbackValueType
        /// The name of the user that you want to query or modify. The value of this parameter is typically your user's username, but it can be any of their alias attributes. If username isn't an alias attribute in your user pool, this value must be the sub of a local user or the username of a user from a third-party IdP.
        public let username: String
        /// The ID of the user pool where you want to update auth event feedback.
        public let userPoolId: String

        @inlinable
        public init(eventId: String, feedbackToken: String, feedbackValue: FeedbackValueType, username: String, userPoolId: String) {
            self.eventId = eventId
            self.feedbackToken = feedbackToken
            self.feedbackValue = feedbackValue
            self.username = username
            self.userPoolId = userPoolId
        }

        public func validate(name: String) throws {
            try self.validate(self.eventId, name: "eventId", parent: name, max: 50)
            try self.validate(self.eventId, name: "eventId", parent: name, min: 1)
            try self.validate(self.eventId, name: "eventId", parent: name, pattern: "^[\\w+-]+$")
            try self.validate(self.feedbackToken, name: "feedbackToken", parent: name, pattern: "^[A-Za-z0-9-_=.]+$")
            try self.validate(self.username, name: "username", parent: name, max: 128)
            try self.validate(self.username, name: "username", parent: name, min: 1)
            try self.validate(self.username, name: "username", parent: name, pattern: "^[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}]+$")
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, max: 55)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, min: 1)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, pattern: "^[\\w-]+_[0-9a-zA-Z]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case eventId = "EventId"
            case feedbackToken = "FeedbackToken"
            case feedbackValue = "FeedbackValue"
            case username = "Username"
            case userPoolId = "UserPoolId"
        }
    }

    public struct UpdateAuthEventFeedbackResponse: AWSDecodableShape {
        public init() {}
    }

    public struct UpdateDeviceStatusRequest: AWSEncodableShape {
        /// A valid access token that Amazon Cognito issued to the currently signed-in user. Must include a scope claim for
        /// aws.cognito.signin.user.admin.
        public let accessToken: String
        /// The device key of the device you want to update, for example us-west-2_a1b2c3d4-5678-90ab-cdef-EXAMPLE11111.
        public let deviceKey: String
        /// To enable device authentication with the specified device, set to remembered.To disable, set to not_remembered.
        public let deviceRememberedStatus: DeviceRememberedStatusType?

        @inlinable
        public init(accessToken: String, deviceKey: String, deviceRememberedStatus: DeviceRememberedStatusType? = nil) {
            self.accessToken = accessToken
            self.deviceKey = deviceKey
            self.deviceRememberedStatus = deviceRememberedStatus
        }

        public func validate(name: String) throws {
            try self.validate(self.accessToken, name: "accessToken", parent: name, pattern: "^[A-Za-z0-9-_=.]+$")
            try self.validate(self.deviceKey, name: "deviceKey", parent: name, max: 55)
            try self.validate(self.deviceKey, name: "deviceKey", parent: name, min: 1)
            try self.validate(self.deviceKey, name: "deviceKey", parent: name, pattern: "^[\\w-]+_[0-9a-f-]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case accessToken = "AccessToken"
            case deviceKey = "DeviceKey"
            case deviceRememberedStatus = "DeviceRememberedStatus"
        }
    }

    public struct UpdateDeviceStatusResponse: AWSDecodableShape {
        public init() {}
    }

    public struct UpdateGroupRequest: AWSEncodableShape {
        /// A new description of the existing group.
        public let description: String?
        /// The name of the group that you want to update.
        public let groupName: String
        /// A non-negative integer value that specifies the precedence of this group relative to the other groups that a user can belong to in the user pool. Zero is the highest precedence value. Groups with lower Precedence values take precedence over groups with higher or null Precedence values. If a user belongs to two or more groups, it is the group with the lowest precedence value whose role ARN is given in the user's tokens for the cognito:roles and cognito:preferred_role claims. Two groups can have the same Precedence value. If this happens, neither group takes precedence over the other. If two groups with the same Precedence have the same role ARN, that role is used in the cognito:preferred_role claim in tokens for users in each group. If the two groups have different role ARNs, the cognito:preferred_role claim isn't set in users' tokens. The default Precedence value is null. The maximum Precedence value is 2^31-1.
        public let precedence: Int?
        /// The Amazon Resource Name (ARN) of an IAM role that you want to associate with the group. The role assignment contributes to the cognito:roles and cognito:preferred_role claims in group members' tokens.
        public let roleArn: String?
        /// The ID of the user pool that contains the group you want to update.
        public let userPoolId: String

        @inlinable
        public init(description: String? = nil, groupName: String, precedence: Int? = nil, roleArn: String? = nil, userPoolId: String) {
            self.description = description
            self.groupName = groupName
            self.precedence = precedence
            self.roleArn = roleArn
            self.userPoolId = userPoolId
        }

        public func validate(name: String) throws {
            try self.validate(self.description, name: "description", parent: name, max: 2048)
            try self.validate(self.groupName, name: "groupName", parent: name, max: 128)
            try self.validate(self.groupName, name: "groupName", parent: name, min: 1)
            try self.validate(self.groupName, name: "groupName", parent: name, pattern: "^[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}]+$")
            try self.validate(self.precedence, name: "precedence", parent: name, min: 0)
            try self.validate(self.roleArn, name: "roleArn", parent: name, max: 2048)
            try self.validate(self.roleArn, name: "roleArn", parent: name, min: 20)
            try self.validate(self.roleArn, name: "roleArn", parent: name, pattern: "^arn:[\\w+=/,.@-]+:[\\w+=/,.@-]+:([\\w+=/,.@-]*)?:[0-9]+:[\\w+=/,.@-]+(:[\\w+=/,.@-]+)?(:[\\w+=/,.@-]+)?$")
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, max: 55)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, min: 1)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, pattern: "^[\\w-]+_[0-9a-zA-Z]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case description = "Description"
            case groupName = "GroupName"
            case precedence = "Precedence"
            case roleArn = "RoleArn"
            case userPoolId = "UserPoolId"
        }
    }

    public struct UpdateGroupResponse: AWSDecodableShape {
        /// Contains the updated details of the group, including precedence, IAM role, and description.
        public let group: GroupType?

        @inlinable
        public init(group: GroupType? = nil) {
            self.group = group
        }

        private enum CodingKeys: String, CodingKey {
            case group = "Group"
        }
    }

    public struct UpdateIdentityProviderRequest: AWSEncodableShape {
        /// A mapping of IdP attributes to standard and custom user pool attributes. Specify a user pool attribute as the key of the key-value pair, and the IdP attribute claim name as the value.
        public let attributeMapping: [String: String]?
        /// An array of IdP identifiers, for example "IdPIdentifiers": [ "MyIdP", "MyIdP2" ]. Identifiers are friendly names that you can pass in the idp_identifier query parameter of requests to the Authorize endpoint to silently redirect to sign-in with the associated IdP. Identifiers in a domain format also enable the use of email-address matching with SAML providers.
        public let idpIdentifiers: [String]?
        /// The scopes, URLs, and identifiers for your external identity provider. The following
        /// examples describe the provider detail keys for each IdP type. These values and their
        /// schema are subject to change. Social IdP authorize_scopes values must match
        /// the values listed here.  OpenID Connect (OIDC)  Amazon Cognito accepts the following elements when it can't discover endpoint URLs from oidc_issuer: attributes_url, authorize_url, jwks_uri, token_url. Create or update request: "ProviderDetails": { "attributes_request_method": "GET", "attributes_url": "https://auth.example.com/userInfo", "authorize_scopes": "openid profile email", "authorize_url": "https://auth.example.com/authorize", "client_id": "1example23456789", "client_secret": "provider-app-client-secret", "jwks_uri": "https://auth.example.com/.well-known/jwks.json", "oidc_issuer": "https://auth.example.com", "token_url": "https://example.com/token" }  Describe response: "ProviderDetails": { "attributes_request_method": "GET", "attributes_url": "https://auth.example.com/userInfo", "attributes_url_add_attributes": "false", "authorize_scopes": "openid profile email", "authorize_url": "https://auth.example.com/authorize", "client_id": "1example23456789", "client_secret": "provider-app-client-secret", "jwks_uri": "https://auth.example.com/.well-known/jwks.json", "oidc_issuer": "https://auth.example.com", "token_url": "https://example.com/token" }   SAML  Create or update request with Metadata URL: "ProviderDetails": { "IDPInit": "true", "IDPSignout": "true", "EncryptedResponses" : "true", "MetadataURL": "https://auth.example.com/sso/saml/metadata", "RequestSigningAlgorithm": "rsa-sha256" }  Create or update request with Metadata file: "ProviderDetails": { "IDPInit": "true", "IDPSignout": "true", "EncryptedResponses" : "true",   "MetadataFile": "[metadata XML]", "RequestSigningAlgorithm": "rsa-sha256" }  The value of MetadataFile must be the plaintext metadata document with all  quote (") characters escaped by backslashes. Describe response: "ProviderDetails": { "IDPInit": "true", "IDPSignout": "true", "EncryptedResponses" : "true", "ActiveEncryptionCertificate": "[certificate]", "MetadataURL": "https://auth.example.com/sso/saml/metadata", "RequestSigningAlgorithm": "rsa-sha256", "SLORedirectBindingURI": "https://auth.example.com/slo/saml", "SSORedirectBindingURI": "https://auth.example.com/sso/saml" }   LoginWithAmazon  Create or update request: "ProviderDetails": { "authorize_scopes": "profile postal_code", "client_id": "amzn1.application-oa2-client.1example23456789", "client_secret": "provider-app-client-secret"  Describe response: "ProviderDetails": { "attributes_url": "https://api.amazon.com/user/profile", "attributes_url_add_attributes": "false", "authorize_scopes": "profile postal_code", "authorize_url": "https://www.amazon.com/ap/oa", "client_id": "amzn1.application-oa2-client.1example23456789", "client_secret": "provider-app-client-secret", "token_request_method": "POST", "token_url": "https://api.amazon.com/auth/o2/token" }   Google  Create or update request: "ProviderDetails": { "authorize_scopes": "email profile openid", "client_id": "1example23456789.apps.googleusercontent.com", "client_secret": "provider-app-client-secret" }  Describe response: "ProviderDetails": { "attributes_url": "https://people.googleapis.com/v1/people/me?personFields=", "attributes_url_add_attributes": "true", "authorize_scopes": "email profile openid", "authorize_url": "https://accounts.google.com/o/oauth2/v2/auth", "client_id": "1example23456789.apps.googleusercontent.com", "client_secret": "provider-app-client-secret", "oidc_issuer": "https://accounts.google.com", "token_request_method": "POST", "token_url": "https://www.googleapis.com/oauth2/v4/token" }   SignInWithApple  Create or update request: "ProviderDetails": { "authorize_scopes": "email name", "client_id": "com.example.cognito", "private_key": "1EXAMPLE",  "key_id": "2EXAMPLE", "team_id": "3EXAMPLE" }  Describe response: "ProviderDetails": { "attributes_url_add_attributes": "false", "authorize_scopes": "email name", "authorize_url": "https://appleid.apple.com/auth/authorize", "client_id": "com.example.cognito", "key_id": "1EXAMPLE", "oidc_issuer": "https://appleid.apple.com", "team_id": "2EXAMPLE", "token_request_method": "POST", "token_url": "https://appleid.apple.com/auth/token" }   Facebook  Create or update request: "ProviderDetails": { "api_version": "v17.0",  "authorize_scopes": "public_profile, email", "client_id": "1example23456789",  "client_secret": "provider-app-client-secret" }  Describe response: "ProviderDetails":  { "api_version": "v17.0", "attributes_url": "https://graph.facebook.com/v17.0/me?fields=",  "attributes_url_add_attributes": "true", "authorize_scopes": "public_profile, email",  "authorize_url": "https://www.facebook.com/v17.0/dialog/oauth", "client_id":  "1example23456789", "client_secret": "provider-app-client-secret", "token_request_method":  "GET", "token_url": "https://graph.facebook.com/v17.0/oauth/access_token" }
        public let providerDetails: [String: String]?
        /// The name of the IdP that you want to update. You can pass the identity provider name in the identity_provider query parameter of requests to the Authorize endpoint to silently redirect to sign-in with the associated IdP.
        public let providerName: String
        /// The Id of the user pool where you want to update your IdP.
        public let userPoolId: String

        @inlinable
        public init(attributeMapping: [String: String]? = nil, idpIdentifiers: [String]? = nil, providerDetails: [String: String]? = nil, providerName: String, userPoolId: String) {
            self.attributeMapping = attributeMapping
            self.idpIdentifiers = idpIdentifiers
            self.providerDetails = providerDetails
            self.providerName = providerName
            self.userPoolId = userPoolId
        }

        public func validate(name: String) throws {
            try self.attributeMapping?.forEach {
                try validate($0.key, name: "attributeMapping.key", parent: name, max: 32)
                try validate($0.key, name: "attributeMapping.key", parent: name, min: 1)
                try validate($0.value, name: "attributeMapping[\"\($0.key)\"]", parent: name, max: 131072)
            }
            try self.idpIdentifiers?.forEach {
                try validate($0, name: "idpIdentifiers[]", parent: name, max: 40)
                try validate($0, name: "idpIdentifiers[]", parent: name, min: 1)
                try validate($0, name: "idpIdentifiers[]", parent: name, pattern: "^[\\w\\s+=.@-]+$")
            }
            try self.validate(self.idpIdentifiers, name: "idpIdentifiers", parent: name, max: 50)
            try self.providerDetails?.forEach {
                try validate($0.key, name: "providerDetails.key", parent: name, max: 131072)
                try validate($0.value, name: "providerDetails[\"\($0.key)\"]", parent: name, max: 131072)
            }
            try self.validate(self.providerName, name: "providerName", parent: name, max: 32)
            try self.validate(self.providerName, name: "providerName", parent: name, min: 1)
            try self.validate(self.providerName, name: "providerName", parent: name, pattern: "^[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}\\p{Z}]+$")
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, max: 55)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, min: 1)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, pattern: "^[\\w-]+_[0-9a-zA-Z]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case attributeMapping = "AttributeMapping"
            case idpIdentifiers = "IdpIdentifiers"
            case providerDetails = "ProviderDetails"
            case providerName = "ProviderName"
            case userPoolId = "UserPoolId"
        }
    }

    public struct UpdateIdentityProviderResponse: AWSDecodableShape {
        /// The identity provider details.
        public let identityProvider: IdentityProviderType

        @inlinable
        public init(identityProvider: IdentityProviderType) {
            self.identityProvider = identityProvider
        }

        private enum CodingKeys: String, CodingKey {
            case identityProvider = "IdentityProvider"
        }
    }

    public struct UpdateManagedLoginBrandingRequest: AWSEncodableShape {
        /// An array of image files that you want to apply to roles like backgrounds, logos, and icons. Each object must also indicate whether it is for dark mode, light mode, or browser-adaptive mode.
        public let assets: [AssetType]?
        /// The ID of the managed login branding style that you want to update.
        public let managedLoginBrandingId: String?
        /// A JSON file, encoded as a Document type, with the the settings that you want to apply to your style. The following components are not currently implemented and reserved for future use:    signUp     instructions     sessionTimerDisplay     languageSelector (for localization, see Managed login localization)
        public let settings: AWSDocument?
        /// When true, applies the default branding style options. This option reverts to default style options that are managed by Amazon Cognito. You can modify them later in the branding editor. When you specify true for this option, you must also omit values for Settings and Assets in the request.
        public let useCognitoProvidedValues: Bool?
        /// The ID of the user pool that contains the managed login branding style that you want to update.
        public let userPoolId: String?

        @inlinable
        public init(assets: [AssetType]? = nil, managedLoginBrandingId: String? = nil, settings: AWSDocument? = nil, useCognitoProvidedValues: Bool? = nil, userPoolId: String? = nil) {
            self.assets = assets
            self.managedLoginBrandingId = managedLoginBrandingId
            self.settings = settings
            self.useCognitoProvidedValues = useCognitoProvidedValues
            self.userPoolId = userPoolId
        }

        public func validate(name: String) throws {
            try self.assets?.forEach {
                try $0.validate(name: "\(name).assets[]")
            }
            try self.validate(self.assets, name: "assets", parent: name, max: 40)
            try self.validate(self.managedLoginBrandingId, name: "managedLoginBrandingId", parent: name, pattern: "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[4][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$")
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, max: 55)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, min: 1)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, pattern: "^[\\w-]+_[0-9a-zA-Z]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case assets = "Assets"
            case managedLoginBrandingId = "ManagedLoginBrandingId"
            case settings = "Settings"
            case useCognitoProvidedValues = "UseCognitoProvidedValues"
            case userPoolId = "UserPoolId"
        }
    }

    public struct UpdateManagedLoginBrandingResponse: AWSDecodableShape {
        /// The details of the branding style that you updated.
        public let managedLoginBranding: ManagedLoginBrandingType?

        @inlinable
        public init(managedLoginBranding: ManagedLoginBrandingType? = nil) {
            self.managedLoginBranding = managedLoginBranding
        }

        private enum CodingKeys: String, CodingKey {
            case managedLoginBranding = "ManagedLoginBranding"
        }
    }

    public struct UpdateResourceServerRequest: AWSEncodableShape {
        /// A unique resource server identifier for the resource server. The identifier can be an API friendly name like solar-system-data. You can also set an API URL like https://solar-system-data-api.example.com as your identifier. Amazon Cognito represents scopes in the access token in the format $resource-server-identifier/$scope. Longer scope-identifier strings increase the size of your access tokens.
        public let identifier: String
        /// The updated name of the resource server.
        public let name: String
        /// An array of updated custom scope names and descriptions that you want to associate with your resource server.
        public let scopes: [ResourceServerScopeType]?
        /// The ID of the user pool that contains the resource server that you want to update.
        public let userPoolId: String

        @inlinable
        public init(identifier: String, name: String, scopes: [ResourceServerScopeType]? = nil, userPoolId: String) {
            self.identifier = identifier
            self.name = name
            self.scopes = scopes
            self.userPoolId = userPoolId
        }

        public func validate(name: String) throws {
            try self.validate(self.identifier, name: "identifier", parent: name, max: 256)
            try self.validate(self.identifier, name: "identifier", parent: name, min: 1)
            try self.validate(self.identifier, name: "identifier", parent: name, pattern: "^[\\x21\\x23-\\x5B\\x5D-\\x7E]+$")
            try self.validate(self.name, name: "name", parent: name, max: 256)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[\\w\\s+=,.@-]+$")
            try self.scopes?.forEach {
                try $0.validate(name: "\(name).scopes[]")
            }
            try self.validate(self.scopes, name: "scopes", parent: name, max: 100)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, max: 55)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, min: 1)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, pattern: "^[\\w-]+_[0-9a-zA-Z]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case identifier = "Identifier"
            case name = "Name"
            case scopes = "Scopes"
            case userPoolId = "UserPoolId"
        }
    }

    public struct UpdateResourceServerResponse: AWSDecodableShape {
        /// The updated details of the requested resource server.
        public let resourceServer: ResourceServerType

        @inlinable
        public init(resourceServer: ResourceServerType) {
            self.resourceServer = resourceServer
        }

        private enum CodingKeys: String, CodingKey {
            case resourceServer = "ResourceServer"
        }
    }

    public struct UpdateTermsRequest: AWSEncodableShape {
        /// This parameter is reserved for future use and currently accepts only one value.
        public let enforcement: TermsEnforcementType?
        /// A map of URLs to languages. For each localized language that will view the requested TermsName, assign a URL. A selection of cognito:default displays for all languages that don't have a language-specific URL. For example, "cognito:default": "https://terms.example.com", "cognito:spanish": "https://terms.example.com/es".
        public let links: [String: String]?
        /// The ID of the terms document that you want to update.
        public let termsId: String
        /// The new name that you want to apply to the requested terms documents.
        public let termsName: String?
        /// This parameter is reserved for future use and currently accepts only one value.
        public let termsSource: TermsSourceType?
        /// The ID of the user pool that contains the terms that you want to update.
        public let userPoolId: String

        @inlinable
        public init(enforcement: TermsEnforcementType? = nil, links: [String: String]? = nil, termsId: String, termsName: String? = nil, termsSource: TermsSourceType? = nil, userPoolId: String) {
            self.enforcement = enforcement
            self.links = links
            self.termsId = termsId
            self.termsName = termsName
            self.termsSource = termsSource
            self.userPoolId = userPoolId
        }

        public func validate(name: String) throws {
            try self.links?.forEach {
                try validate($0.key, name: "links.key", parent: name, pattern: "^cognito:(default|english|french|spanish|german|bahasa-indonesia|italian|japanese|korean|portuguese-brazil|chinese-(simplified|traditional))$")
                try validate($0.value, name: "links[\"\($0.key)\"]", parent: name, max: 1024)
                try validate($0.value, name: "links[\"\($0.key)\"]", parent: name, min: 1)
                try validate($0.value, name: "links[\"\($0.key)\"]", parent: name, pattern: "^[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}]+$")
            }
            try self.validate(self.links, name: "links", parent: name, max: 12)
            try self.validate(self.links, name: "links", parent: name, min: 1)
            try self.validate(self.termsId, name: "termsId", parent: name, pattern: "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[4][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$")
            try self.validate(self.termsName, name: "termsName", parent: name, pattern: "^(terms-of-use|privacy-policy)$")
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, max: 55)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, min: 1)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, pattern: "^[\\w-]+_[0-9a-zA-Z]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case enforcement = "Enforcement"
            case links = "Links"
            case termsId = "TermsId"
            case termsName = "TermsName"
            case termsSource = "TermsSource"
            case userPoolId = "UserPoolId"
        }
    }

    public struct UpdateTermsResponse: AWSDecodableShape {
        /// A summary of the updates to your terms documents.
        public let terms: TermsType?

        @inlinable
        public init(terms: TermsType? = nil) {
            self.terms = terms
        }

        private enum CodingKeys: String, CodingKey {
            case terms = "Terms"
        }
    }

    public struct UpdateUserAttributesRequest: AWSEncodableShape {
        /// A valid access token that Amazon Cognito issued to the currently signed-in user. Must include a scope claim for
        /// aws.cognito.signin.user.admin.
        public let accessToken: String
        /// A map of custom key-value pairs that you can provide as input for any custom workflows that this action initiates.  You create custom workflows by assigning Lambda functions to user pool triggers. When you use the UpdateUserAttributes API action, Amazon Cognito invokes the function that is assigned to the custom message trigger. When Amazon Cognito invokes this function, it passes a JSON payload, which the function receives as input. This payload contains a clientMetadata attribute, which provides the data that you assigned to the ClientMetadata parameter in your UpdateUserAttributes request. In your function code in Lambda, you can process the clientMetadata value to enhance your workflow for your specific needs. For more information, see
        /// Using Lambda triggers in the Amazon Cognito Developer Guide.  When you use the ClientMetadata parameter, note that Amazon Cognito won't do the following:   Store the ClientMetadata value. This data is available only to Lambda triggers that are assigned to a user pool to support custom workflows. If your user pool configuration doesn't include triggers, the ClientMetadata parameter serves no purpose.   Validate the ClientMetadata value.   Encrypt the ClientMetadata value. Don't send sensitive information in this parameter.
        public let clientMetadata: [String: String]?
        /// An array of name-value pairs representing user attributes. For custom attributes, you must add a custom: prefix to the attribute name. If you have set an attribute to require verification before Amazon Cognito updates its value, this request doesn’t immediately update the value of that attribute. After your user receives and responds to a verification message to verify the new value, Amazon Cognito updates the attribute value. Your user can sign in and receive messages with the original attribute value until they verify the new value.
        public let userAttributes: [AttributeType]

        @inlinable
        public init(accessToken: String, clientMetadata: [String: String]? = nil, userAttributes: [AttributeType]) {
            self.accessToken = accessToken
            self.clientMetadata = clientMetadata
            self.userAttributes = userAttributes
        }

        public func validate(name: String) throws {
            try self.validate(self.accessToken, name: "accessToken", parent: name, pattern: "^[A-Za-z0-9-_=.]+$")
            try self.clientMetadata?.forEach {
                try validate($0.key, name: "clientMetadata.key", parent: name, max: 131072)
                try validate($0.value, name: "clientMetadata[\"\($0.key)\"]", parent: name, max: 131072)
            }
            try self.userAttributes.forEach {
                try $0.validate(name: "\(name).userAttributes[]")
            }
        }

        private enum CodingKeys: String, CodingKey {
            case accessToken = "AccessToken"
            case clientMetadata = "ClientMetadata"
            case userAttributes = "UserAttributes"
        }
    }

    public struct UpdateUserAttributesResponse: AWSDecodableShape {
        /// When the attribute-update request includes an email address or phone number attribute, Amazon Cognito sends a message to users with a code that confirms ownership of the new value that they entered. The CodeDeliveryDetails object is information about the delivery destination for that link or code. This behavior happens in user pools configured to automatically verify changes to those attributes. For more information, see Verifying when users change their email or phone number.
        public let codeDeliveryDetailsList: [CodeDeliveryDetailsType]?

        @inlinable
        public init(codeDeliveryDetailsList: [CodeDeliveryDetailsType]? = nil) {
            self.codeDeliveryDetailsList = codeDeliveryDetailsList
        }

        private enum CodingKeys: String, CodingKey {
            case codeDeliveryDetailsList = "CodeDeliveryDetailsList"
        }
    }

    public struct UpdateUserPoolClientRequest: AWSEncodableShape {
        /// The access token time limit. After this limit expires, your user can't use
        /// their access token. To specify the time unit for AccessTokenValidity as
        /// seconds, minutes, hours, or days,
        /// set a TokenValidityUnits value in your API request. For example, when you set AccessTokenValidity to 10 and
        /// TokenValidityUnits to hours, your user can authorize access with
        /// their access token for 10 hours. The default time unit for AccessTokenValidity in an API request is hours.
        /// Valid range is displayed below in seconds. If you don't specify otherwise in the configuration of your app client, your access
        /// tokens are valid for one hour.
        public let accessTokenValidity: Int?
        /// The OAuth grant types that you want your app client to generate. To create an app client that generates client credentials grants, you must add client_credentials as the only allowed OAuth flow.  code  Use a code grant flow, which provides an authorization code as the response. This code can be exchanged for access tokens with the /oauth2/token endpoint.  implicit  Issue the access token (and, optionally, ID token, based on scopes) directly to your user.  client_credentials  Issue the access token from the /oauth2/token endpoint directly to a non-person user using a combination of the client ID and client secret.
        public let allowedOAuthFlows: [OAuthFlowType]?
        /// Set to true to use OAuth 2.0 authorization server features in your app client. This parameter must have a value of true before you can configure
        /// the following features in your app client.    CallBackURLs: Callback URLs.    LogoutURLs: Sign-out redirect URLs.    AllowedOAuthScopes: OAuth 2.0 scopes.    AllowedOAuthFlows: Support for authorization code, implicit, and client credentials OAuth 2.0 grants.   To use authorization server features, configure one of these features in the Amazon Cognito console or set
        /// AllowedOAuthFlowsUserPoolClient to true in a CreateUserPoolClient or
        /// UpdateUserPoolClient API request. If you don't set a value for
        /// AllowedOAuthFlowsUserPoolClient in a request with the CLI or SDKs, it defaults
        /// to false. When false, only SDK-based API sign-in is permitted.
        public let allowedOAuthFlowsUserPoolClient: Bool?
        /// The OAuth, OpenID Connect (OIDC), and custom scopes that you want to permit your app client to authorize access with. Scopes govern access control to user pool self-service API operations, user data from the userInfo endpoint, and third-party APIs. Scope values include phone, email, openid, and profile. The aws.cognito.signin.user.admin scope authorizes user self-service operations. Custom scopes with resource servers authorize access to external APIs.
        public let allowedOAuthScopes: [String]?
        /// The user pool analytics configuration for collecting metrics and sending them to your Amazon Pinpoint campaign. In Amazon Web Services Regions where Amazon Pinpoint isn't available, user pools might not have access to analytics or might be configurable with campaigns in the US East (N. Virginia) Region. For more information, see Using Amazon Pinpoint analytics.
        public let analyticsConfiguration: AnalyticsConfigurationType?
        /// Amazon Cognito creates a session token for each API request in an authentication flow. AuthSessionValidity is the duration,
        /// in minutes, of that session token. Your user pool native user must respond to each authentication challenge before the session expires.
        public let authSessionValidity: Int?
        /// A list of allowed redirect, or callback, URLs for managed login authentication. These URLs are the paths where you want to send your users' browsers after they complete authentication with managed login or a third-party IdP. Typically, callback URLs are the home of an application that uses OAuth or OIDC libraries to process authentication outcomes. A redirect URI must meet the following requirements:   Be an absolute URI.   Be registered with the authorization server. Amazon Cognito doesn't accept authorization requests with redirect_uri values that aren't in the list of CallbackURLs that you provide in this parameter.   Not include a fragment component.   See OAuth 2.0 - Redirection Endpoint. Amazon Cognito requires HTTPS over HTTP except for http://localhost for testing purposes only. App callback URLs such as myapp://example are also supported.
        public let callbackURLs: [String]?
        /// The ID of the app client that you want to update.
        public let clientId: String
        /// A friendly name for the app client.
        public let clientName: String?
        /// The default redirect URI. In app clients with one assigned IdP, replaces redirect_uri in authentication requests. Must be in the CallbackURLs list.
        public let defaultRedirectURI: String?
        /// When true, your application can include additional UserContextData in authentication requests. This data includes the IP address, and contributes to analysis by threat protection features. For more information about propagation of user context data, see Adding session data to API requests. If you don’t include this parameter, you can't send the source IP address to Amazon Cognito threat protection features. You can only activate EnablePropagateAdditionalUserContextData in an app client that has a client secret.
        public let enablePropagateAdditionalUserContextData: Bool?
        /// Activates or deactivates token revocation in the target app client.
        public let enableTokenRevocation: Bool?
        /// The authentication flows that you want your user pool client to support. For each app
        /// client in your user pool, you can sign in your users with any combination of one or more flows, including with
        /// a user name and Secure Remote Password (SRP), a user name and password, or a custom authentication process that
        /// you define with Lambda functions.  If you don't specify a value for ExplicitAuthFlows, your app client supports
        /// ALLOW_REFRESH_TOKEN_AUTH, ALLOW_USER_SRP_AUTH, and ALLOW_CUSTOM_AUTH.
        ///   The values for authentication flow options include the following.    ALLOW_USER_AUTH: Enable selection-based sign-in with USER_AUTH. This setting covers username-password, secure remote password (SRP), passwordless, and passkey authentication. This authentiation flow can do username-password and SRP authentication without other ExplicitAuthFlows permitting them. For example users can complete an SRP challenge through USER_AUTH  without the flow USER_SRP_AUTH being active for the app client. This flow doesn't include CUSTOM_AUTH.  To activate this setting, your user pool must be in the  Essentials tier or higher.    ALLOW_ADMIN_USER_PASSWORD_AUTH: Enable admin based user password authentication flow ADMIN_USER_PASSWORD_AUTH. This setting replaces the ADMIN_NO_SRP_AUTH setting. With this authentication flow, your app passes a user name and password to Amazon Cognito in the request, instead of using the Secure  Remote Password (SRP) protocol to securely transmit the password.    ALLOW_CUSTOM_AUTH: Enable Lambda trigger based authentication.    ALLOW_USER_PASSWORD_AUTH: Enable user password-based authentication. In this flow, Amazon Cognito receives the password in the request instead of using the SRP protocol to verify passwords.    ALLOW_USER_SRP_AUTH: Enable SRP-based authentication.    ALLOW_REFRESH_TOKEN_AUTH: Enable authflow to refresh tokens.   In some environments, you will see the values ADMIN_NO_SRP_AUTH, CUSTOM_AUTH_FLOW_ONLY, or USER_PASSWORD_AUTH.
        /// You can't assign these legacy ExplicitAuthFlows values to user pool clients at the same time as values that begin with ALLOW_,
        /// like ALLOW_USER_SRP_AUTH.
        public let explicitAuthFlows: [ExplicitAuthFlowsType]?
        /// The ID token time limit. After this limit expires, your user can't use
        /// their ID token. To specify the time unit for IdTokenValidity as
        /// seconds, minutes, hours, or days,
        /// set a TokenValidityUnits value in your API request. For example, when you set IdTokenValidity as 10 and
        /// TokenValidityUnits as hours, your user can authenticate their
        /// session with their ID token for 10 hours. The default time unit for IdTokenValidity in an API request is hours.
        /// Valid range is displayed below in seconds. If you don't specify otherwise in the configuration of your app client, your ID
        /// tokens are valid for one hour.
        public let idTokenValidity: Int?
        /// A list of allowed logout URLs for managed login authentication. When you pass logout_uri and client_id parameters to /logout, Amazon Cognito signs out your user and redirects them to the logout URL. This parameter describes the URLs that you want to be the permitted targets of logout_uri. A typical use of these URLs is when a user selects "Sign out" and you redirect them to your public homepage. For more information, see Logout endpoint.
        public let logoutURLs: [String]?
        /// When ENABLED, suppresses messages that might indicate a valid user exists  when someone attempts sign-in. This parameters sets your preference for the errors and  responses that you want Amazon Cognito APIs to return during authentication, account confirmation, and password recovery when the user doesn't exist in the user pool. When set to ENABLED and the user doesn't exist, authentication returns an error indicating either the username or password was incorrect. Account confirmation and password recovery return a response indicating a code was sent to a simulated destination. When set to LEGACY, those APIs return a UserNotFoundException exception if the user doesn't exist in the user pool. Defaults to LEGACY.
        public let preventUserExistenceErrors: PreventUserExistenceErrorTypes?
        /// The list of user attributes that you want your app client to have read access to. After your user authenticates in your app, their access token authorizes them to read their own attribute value for any attribute in this list. When you don't specify the ReadAttributes for your app client, your app can read the values of email_verified, phone_number_verified, and the standard attributes of your user pool. When your user pool app client has read access to these default attributes, ReadAttributes doesn't return any information. Amazon Cognito only populates ReadAttributes in the API response if you have specified your own custom set of read attributes.
        public let readAttributes: [String]?
        /// The configuration of your app client for refresh token rotation. When enabled, your app client issues new ID, access, and refresh tokens when users renew their sessions with refresh tokens. When disabled, token refresh issues only ID and access tokens.
        public let refreshTokenRotation: RefreshTokenRotationType?
        /// The refresh token time limit. After this limit expires, your user can't use
        /// their refresh token. To specify the time unit for RefreshTokenValidity as
        /// seconds, minutes, hours, or days,
        /// set a TokenValidityUnits value in your API request. For example, when you set RefreshTokenValidity as 10 and
        /// TokenValidityUnits as days, your user can refresh their session
        /// and retrieve new access and ID tokens for 10 days. The default time unit for RefreshTokenValidity in an API request is days.
        /// You can't set RefreshTokenValidity to 0. If you do, Amazon Cognito overrides the
        /// value with the default value of 30 days. Valid range is displayed below
        /// in seconds. If you don't specify otherwise in the configuration of your app client, your refresh
        /// tokens are valid for 30 days.
        public let refreshTokenValidity: Int?
        /// A list of provider names for the identity providers (IdPs) that are supported on this client. The following are supported: COGNITO, Facebook, Google, SignInWithApple, and LoginWithAmazon. You can also specify the names that you configured for the SAML and OIDC IdPs in your user pool, for example MySAMLIdP or MyOIDCIdP. This parameter sets the IdPs that managed  login will display on the login page for your app client. The removal of  COGNITO from this list doesn't prevent authentication operations  for local users with the user pools API in an Amazon Web Services SDK. The only way to prevent  SDK-based authentication is to block access with a WAF rule.
        public let supportedIdentityProviders: [String]?
        /// The units that validity times are represented in. The default unit for refresh tokens is days, and the default for ID and access tokens are hours.
        public let tokenValidityUnits: TokenValidityUnitsType?
        /// The ID of the user pool where you want to update the app client.
        public let userPoolId: String
        /// The list of user attributes that you want your app client to have write access to. After your user authenticates in your app, their access token authorizes them to set or modify their own attribute value for any attribute in this list. When you don't specify the WriteAttributes for your app client, your app can write the values of the Standard attributes of your user pool. When your user pool has write access to these default attributes, WriteAttributes doesn't return any information. Amazon Cognito only populates WriteAttributes in the API response if you have specified your own custom set of write attributes. If your app client allows users to sign in through an IdP, this array must include all attributes that you have mapped to IdP attributes. Amazon Cognito updates mapped attributes when users sign in to your application through an IdP. If your app client does not have write access to a mapped attribute, Amazon Cognito throws an error when it tries to update the attribute. For more information, see Specifying IdP Attribute Mappings for Your user pool.
        public let writeAttributes: [String]?

        @inlinable
        public init(accessTokenValidity: Int? = nil, allowedOAuthFlows: [OAuthFlowType]? = nil, allowedOAuthFlowsUserPoolClient: Bool? = nil, allowedOAuthScopes: [String]? = nil, analyticsConfiguration: AnalyticsConfigurationType? = nil, authSessionValidity: Int? = nil, callbackURLs: [String]? = nil, clientId: String, clientName: String? = nil, defaultRedirectURI: String? = nil, enablePropagateAdditionalUserContextData: Bool? = nil, enableTokenRevocation: Bool? = nil, explicitAuthFlows: [ExplicitAuthFlowsType]? = nil, idTokenValidity: Int? = nil, logoutURLs: [String]? = nil, preventUserExistenceErrors: PreventUserExistenceErrorTypes? = nil, readAttributes: [String]? = nil, refreshTokenRotation: RefreshTokenRotationType? = nil, refreshTokenValidity: Int? = nil, supportedIdentityProviders: [String]? = nil, tokenValidityUnits: TokenValidityUnitsType? = nil, userPoolId: String, writeAttributes: [String]? = nil) {
            self.accessTokenValidity = accessTokenValidity
            self.allowedOAuthFlows = allowedOAuthFlows
            self.allowedOAuthFlowsUserPoolClient = allowedOAuthFlowsUserPoolClient
            self.allowedOAuthScopes = allowedOAuthScopes
            self.analyticsConfiguration = analyticsConfiguration
            self.authSessionValidity = authSessionValidity
            self.callbackURLs = callbackURLs
            self.clientId = clientId
            self.clientName = clientName
            self.defaultRedirectURI = defaultRedirectURI
            self.enablePropagateAdditionalUserContextData = enablePropagateAdditionalUserContextData
            self.enableTokenRevocation = enableTokenRevocation
            self.explicitAuthFlows = explicitAuthFlows
            self.idTokenValidity = idTokenValidity
            self.logoutURLs = logoutURLs
            self.preventUserExistenceErrors = preventUserExistenceErrors
            self.readAttributes = readAttributes
            self.refreshTokenRotation = refreshTokenRotation
            self.refreshTokenValidity = refreshTokenValidity
            self.supportedIdentityProviders = supportedIdentityProviders
            self.tokenValidityUnits = tokenValidityUnits
            self.userPoolId = userPoolId
            self.writeAttributes = writeAttributes
        }

        public func validate(name: String) throws {
            try self.validate(self.accessTokenValidity, name: "accessTokenValidity", parent: name, max: 86400)
            try self.validate(self.accessTokenValidity, name: "accessTokenValidity", parent: name, min: 1)
            try self.validate(self.allowedOAuthFlows, name: "allowedOAuthFlows", parent: name, max: 3)
            try self.allowedOAuthScopes?.forEach {
                try validate($0, name: "allowedOAuthScopes[]", parent: name, max: 256)
                try validate($0, name: "allowedOAuthScopes[]", parent: name, min: 1)
                try validate($0, name: "allowedOAuthScopes[]", parent: name, pattern: "^[\\x21\\x23-\\x5B\\x5D-\\x7E]+$")
            }
            try self.validate(self.allowedOAuthScopes, name: "allowedOAuthScopes", parent: name, max: 50)
            try self.analyticsConfiguration?.validate(name: "\(name).analyticsConfiguration")
            try self.validate(self.authSessionValidity, name: "authSessionValidity", parent: name, max: 15)
            try self.validate(self.authSessionValidity, name: "authSessionValidity", parent: name, min: 3)
            try self.callbackURLs?.forEach {
                try validate($0, name: "callbackURLs[]", parent: name, max: 1024)
                try validate($0, name: "callbackURLs[]", parent: name, min: 1)
                try validate($0, name: "callbackURLs[]", parent: name, pattern: "^[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}]+$")
            }
            try self.validate(self.callbackURLs, name: "callbackURLs", parent: name, max: 100)
            try self.validate(self.clientId, name: "clientId", parent: name, max: 128)
            try self.validate(self.clientId, name: "clientId", parent: name, min: 1)
            try self.validate(self.clientId, name: "clientId", parent: name, pattern: "^[\\w+]+$")
            try self.validate(self.clientName, name: "clientName", parent: name, max: 128)
            try self.validate(self.clientName, name: "clientName", parent: name, min: 1)
            try self.validate(self.clientName, name: "clientName", parent: name, pattern: "^[\\w\\s+=,.@-]+$")
            try self.validate(self.defaultRedirectURI, name: "defaultRedirectURI", parent: name, max: 1024)
            try self.validate(self.defaultRedirectURI, name: "defaultRedirectURI", parent: name, min: 1)
            try self.validate(self.defaultRedirectURI, name: "defaultRedirectURI", parent: name, pattern: "^[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}]+$")
            try self.validate(self.idTokenValidity, name: "idTokenValidity", parent: name, max: 86400)
            try self.validate(self.idTokenValidity, name: "idTokenValidity", parent: name, min: 1)
            try self.logoutURLs?.forEach {
                try validate($0, name: "logoutURLs[]", parent: name, max: 1024)
                try validate($0, name: "logoutURLs[]", parent: name, min: 1)
                try validate($0, name: "logoutURLs[]", parent: name, pattern: "^[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}]+$")
            }
            try self.validate(self.logoutURLs, name: "logoutURLs", parent: name, max: 100)
            try self.readAttributes?.forEach {
                try validate($0, name: "readAttributes[]", parent: name, max: 2048)
                try validate($0, name: "readAttributes[]", parent: name, min: 1)
            }
            try self.refreshTokenRotation?.validate(name: "\(name).refreshTokenRotation")
            try self.validate(self.refreshTokenValidity, name: "refreshTokenValidity", parent: name, max: 315360000)
            try self.validate(self.refreshTokenValidity, name: "refreshTokenValidity", parent: name, min: 0)
            try self.supportedIdentityProviders?.forEach {
                try validate($0, name: "supportedIdentityProviders[]", parent: name, max: 32)
                try validate($0, name: "supportedIdentityProviders[]", parent: name, min: 1)
                try validate($0, name: "supportedIdentityProviders[]", parent: name, pattern: "^[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}\\p{Z}]+$")
            }
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, max: 55)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, min: 1)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, pattern: "^[\\w-]+_[0-9a-zA-Z]+$")
            try self.writeAttributes?.forEach {
                try validate($0, name: "writeAttributes[]", parent: name, max: 2048)
                try validate($0, name: "writeAttributes[]", parent: name, min: 1)
            }
        }

        private enum CodingKeys: String, CodingKey {
            case accessTokenValidity = "AccessTokenValidity"
            case allowedOAuthFlows = "AllowedOAuthFlows"
            case allowedOAuthFlowsUserPoolClient = "AllowedOAuthFlowsUserPoolClient"
            case allowedOAuthScopes = "AllowedOAuthScopes"
            case analyticsConfiguration = "AnalyticsConfiguration"
            case authSessionValidity = "AuthSessionValidity"
            case callbackURLs = "CallbackURLs"
            case clientId = "ClientId"
            case clientName = "ClientName"
            case defaultRedirectURI = "DefaultRedirectURI"
            case enablePropagateAdditionalUserContextData = "EnablePropagateAdditionalUserContextData"
            case enableTokenRevocation = "EnableTokenRevocation"
            case explicitAuthFlows = "ExplicitAuthFlows"
            case idTokenValidity = "IdTokenValidity"
            case logoutURLs = "LogoutURLs"
            case preventUserExistenceErrors = "PreventUserExistenceErrors"
            case readAttributes = "ReadAttributes"
            case refreshTokenRotation = "RefreshTokenRotation"
            case refreshTokenValidity = "RefreshTokenValidity"
            case supportedIdentityProviders = "SupportedIdentityProviders"
            case tokenValidityUnits = "TokenValidityUnits"
            case userPoolId = "UserPoolId"
            case writeAttributes = "WriteAttributes"
        }
    }

    public struct UpdateUserPoolClientResponse: AWSDecodableShape {
        /// The updated details of your app client.
        public let userPoolClient: UserPoolClientType?

        @inlinable
        public init(userPoolClient: UserPoolClientType? = nil) {
            self.userPoolClient = userPoolClient
        }

        private enum CodingKeys: String, CodingKey {
            case userPoolClient = "UserPoolClient"
        }
    }

    public struct UpdateUserPoolDomainRequest: AWSEncodableShape {
        /// The configuration for a custom domain that hosts managed login for your application. In an UpdateUserPoolDomain request, this parameter specifies an SSL certificate for the managed login hosted webserver. The certificate must be an ACM ARN in us-east-1. When you create a custom domain, the passkey RP ID defaults to the custom domain. If you had a prefix domain active, this will cause passkey integration for your prefix domain to stop working due to a mismatch in RP ID. To keep the prefix domain passkey integration working, you can explicitly set RP ID to the prefix domain.
        public let customDomainConfig: CustomDomainConfigType?
        /// The name of the domain that you want to update. For custom domains, this is the fully-qualified domain name, for example auth.example.com. For prefix domains, this is the prefix alone, such as myprefix.
        public let domain: String
        /// A version number that indicates the state of managed login for your domain. Version 1 is hosted UI (classic). Version 2 is the newer managed login with the branding editor. For more information, see Managed login.
        public let managedLoginVersion: Int?
        /// The ID of the user pool that is associated with the domain you're updating.
        public let userPoolId: String

        @inlinable
        public init(customDomainConfig: CustomDomainConfigType? = nil, domain: String, managedLoginVersion: Int? = nil, userPoolId: String) {
            self.customDomainConfig = customDomainConfig
            self.domain = domain
            self.managedLoginVersion = managedLoginVersion
            self.userPoolId = userPoolId
        }

        public func validate(name: String) throws {
            try self.customDomainConfig?.validate(name: "\(name).customDomainConfig")
            try self.validate(self.domain, name: "domain", parent: name, max: 63)
            try self.validate(self.domain, name: "domain", parent: name, min: 1)
            try self.validate(self.domain, name: "domain", parent: name, pattern: "^[a-z0-9](?:[a-z0-9\\-]{0,61}[a-z0-9])?$")
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, max: 55)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, min: 1)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, pattern: "^[\\w-]+_[0-9a-zA-Z]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case customDomainConfig = "CustomDomainConfig"
            case domain = "Domain"
            case managedLoginVersion = "ManagedLoginVersion"
            case userPoolId = "UserPoolId"
        }
    }

    public struct UpdateUserPoolDomainResponse: AWSDecodableShape {
        /// The fully-qualified domain name (FQDN) of the Amazon CloudFront distribution that hosts your managed login or classic hosted UI pages. You domain-name authority must have an alias record that points requests for your custom domain to this FQDN. Amazon Cognito returns this value if you set a custom domain with CustomDomainConfig. If you set an Amazon Cognito prefix domain, this operation returns a blank response.
        public let cloudFrontDomain: String?
        /// A version number that indicates the state of managed login for your domain. Version 1 is hosted UI (classic). Version 2 is the newer managed login with the branding editor. For more information, see Managed login.
        public let managedLoginVersion: Int?

        @inlinable
        public init(cloudFrontDomain: String? = nil, managedLoginVersion: Int? = nil) {
            self.cloudFrontDomain = cloudFrontDomain
            self.managedLoginVersion = managedLoginVersion
        }

        private enum CodingKeys: String, CodingKey {
            case cloudFrontDomain = "CloudFrontDomain"
            case managedLoginVersion = "ManagedLoginVersion"
        }
    }

    public struct UpdateUserPoolRequest: AWSEncodableShape {
        /// The available verified method a user can use to recover their password when they call ForgotPassword. You can use this setting to define a preferred method when a user has more than one method available. With this setting, SMS doesn't qualify for a valid password recovery mechanism if the user also has SMS multi-factor authentication (MFA) activated. In the absence of this setting, Amazon Cognito uses the legacy behavior to determine the recovery method where SMS is preferred through email.
        public let accountRecoverySetting: AccountRecoverySettingType?
        /// The configuration for administrative creation of users. Includes the template for the invitation message for new users, the duration of temporary passwords, and permitting self-service sign-up.
        public let adminCreateUserConfig: AdminCreateUserConfigType?
        /// The attributes that you want your user pool to automatically verify. Possible values: email, phone_number. For more information see Verifying contact information at sign-up.
        public let autoVerifiedAttributes: [VerifiedAttributeType]?
        /// When active, DeletionProtection prevents accidental deletion of your user
        /// pool. Before you can delete a user pool that you have protected against deletion, you
        /// must deactivate this feature. When you try to delete a protected user pool in a DeleteUserPool API request,
        /// Amazon Cognito returns an InvalidParameterException error. To delete a protected user pool,
        /// send a new DeleteUserPool request after you deactivate deletion protection in an
        /// UpdateUserPool API request.
        public let deletionProtection: DeletionProtectionType?
        /// The device-remembering configuration for a user pool. Device remembering or device tracking is a "Remember me on this device" option for user pools that perform authentication with the device key of a trusted device in the back end, instead of a user-provided MFA code. For more information about device authentication, see Working with user devices in your user pool. A null value indicates that you have deactivated device remembering in your user pool.  When you provide a value for any DeviceConfiguration field, you activate the Amazon Cognito device-remembering feature. For more information, see Working with devices.
        public let deviceConfiguration: DeviceConfigurationType?
        /// The email configuration of your user pool. The email configuration type sets your preferred sending method, Amazon Web Services Region, and sender for email invitation and verification messages from your user pool.
        public let emailConfiguration: EmailConfigurationType?
        /// This parameter is no longer used.
        public let emailVerificationMessage: String?
        /// This parameter is no longer used.
        public let emailVerificationSubject: String?
        /// A collection of user pool Lambda triggers. Amazon Cognito invokes triggers at several possible stages of authentication operations. Triggers can modify the outcome of the operations that invoked them.
        public let lambdaConfig: LambdaConfigType?
        /// Sets multi-factor authentication (MFA) to be on, off, or optional. When ON, all users must set up MFA before they can sign in. When OPTIONAL, your application must make a client-side determination of whether a user wants to register an MFA device. For user pools with adaptive authentication with threat protection, choose OPTIONAL. When MfaConfiguration is OPTIONAL, managed login doesn't automatically prompt users to set up MFA. Amazon Cognito generates MFA prompts in API responses and in managed login for users who have chosen and configured a preferred MFA factor.
        public let mfaConfiguration: UserPoolMfaType?
        /// The password policy and sign-in policy in the user pool. The password policy sets options like password complexity requirements and password history. The sign-in policy sets the options available to applications in choice-based authentication.
        public let policies: UserPoolPolicyType?
        /// The updated name of your user pool.
        public let poolName: String?
        /// The contents of the SMS message that your user pool sends to users in SMS authentication.
        public let smsAuthenticationMessage: String?
        /// The SMS configuration with the settings for your Amazon Cognito user pool to send SMS message with Amazon Simple Notification Service. To send SMS messages with Amazon SNS in the Amazon Web Services Region that you want, the Amazon Cognito user pool uses an Identity and Access Management (IAM) role in your Amazon Web Services account. For more information see SMS message settings.
        public let smsConfiguration: SmsConfigurationType?
        /// This parameter is no longer used.
        public let smsVerificationMessage: String?
        /// The settings for updates to user attributes. These settings include the property AttributesRequireVerificationBeforeUpdate,
        /// a user-pool setting that tells Amazon Cognito how to handle changes to the value of your users' email address and phone number attributes. For
        /// more information, see
        /// Verifying updates to email addresses and phone numbers.
        public let userAttributeUpdateSettings: UserAttributeUpdateSettingsType?
        /// Contains settings for activation of threat protection, including the operating
        /// mode and additional authentication types. To log user security information but take
        /// no action, set to AUDIT. To configure automatic security responses to
        /// potentially unwanted traffic to your user pool, set to ENFORCED. For more information, see Adding advanced security to a user pool. To activate this setting, your user pool must be on the  Plus tier.
        public let userPoolAddOns: UserPoolAddOnsType?
        /// The ID of the user pool you want to update.
        public let userPoolId: String
        /// The tag keys and values to assign to the user pool. A tag is a label that you can use to categorize and manage user pools in different ways, such as by purpose, owner, environment, or other criteria.
        public let userPoolTags: [String: String]?
        /// The user pool feature plan, or tier. This parameter determines the eligibility of the user pool for features like managed login, access-token customization, and threat protection. Defaults to ESSENTIALS.
        public let userPoolTier: UserPoolTierType?
        /// The template for the verification message that your user pool delivers to users who set an email address or phone number attribute. Set the email message type that corresponds to your DefaultEmailOption selection. For CONFIRM_WITH_LINK, specify an EmailMessageByLink and leave EmailMessage blank. For CONFIRM_WITH_CODE, specify an EmailMessage and leave EmailMessageByLink blank. When you supply both parameters with either choice, Amazon Cognito returns an error.
        public let verificationMessageTemplate: VerificationMessageTemplateType?

        @inlinable
        public init(accountRecoverySetting: AccountRecoverySettingType? = nil, adminCreateUserConfig: AdminCreateUserConfigType? = nil, autoVerifiedAttributes: [VerifiedAttributeType]? = nil, deletionProtection: DeletionProtectionType? = nil, deviceConfiguration: DeviceConfigurationType? = nil, emailConfiguration: EmailConfigurationType? = nil, emailVerificationMessage: String? = nil, emailVerificationSubject: String? = nil, lambdaConfig: LambdaConfigType? = nil, mfaConfiguration: UserPoolMfaType? = nil, policies: UserPoolPolicyType? = nil, poolName: String? = nil, smsAuthenticationMessage: String? = nil, smsConfiguration: SmsConfigurationType? = nil, smsVerificationMessage: String? = nil, userAttributeUpdateSettings: UserAttributeUpdateSettingsType? = nil, userPoolAddOns: UserPoolAddOnsType? = nil, userPoolId: String, userPoolTags: [String: String]? = nil, userPoolTier: UserPoolTierType? = nil, verificationMessageTemplate: VerificationMessageTemplateType? = nil) {
            self.accountRecoverySetting = accountRecoverySetting
            self.adminCreateUserConfig = adminCreateUserConfig
            self.autoVerifiedAttributes = autoVerifiedAttributes
            self.deletionProtection = deletionProtection
            self.deviceConfiguration = deviceConfiguration
            self.emailConfiguration = emailConfiguration
            self.emailVerificationMessage = emailVerificationMessage
            self.emailVerificationSubject = emailVerificationSubject
            self.lambdaConfig = lambdaConfig
            self.mfaConfiguration = mfaConfiguration
            self.policies = policies
            self.poolName = poolName
            self.smsAuthenticationMessage = smsAuthenticationMessage
            self.smsConfiguration = smsConfiguration
            self.smsVerificationMessage = smsVerificationMessage
            self.userAttributeUpdateSettings = userAttributeUpdateSettings
            self.userPoolAddOns = userPoolAddOns
            self.userPoolId = userPoolId
            self.userPoolTags = userPoolTags
            self.userPoolTier = userPoolTier
            self.verificationMessageTemplate = verificationMessageTemplate
        }

        public func validate(name: String) throws {
            try self.accountRecoverySetting?.validate(name: "\(name).accountRecoverySetting")
            try self.adminCreateUserConfig?.validate(name: "\(name).adminCreateUserConfig")
            try self.emailConfiguration?.validate(name: "\(name).emailConfiguration")
            try self.validate(self.emailVerificationMessage, name: "emailVerificationMessage", parent: name, max: 20000)
            try self.validate(self.emailVerificationMessage, name: "emailVerificationMessage", parent: name, min: 6)
            try self.validate(self.emailVerificationMessage, name: "emailVerificationMessage", parent: name, pattern: "^[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}\\s*]*\\{####\\}[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}\\s*]*$")
            try self.validate(self.emailVerificationSubject, name: "emailVerificationSubject", parent: name, max: 140)
            try self.validate(self.emailVerificationSubject, name: "emailVerificationSubject", parent: name, min: 1)
            try self.validate(self.emailVerificationSubject, name: "emailVerificationSubject", parent: name, pattern: "^[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}\\s]+$")
            try self.lambdaConfig?.validate(name: "\(name).lambdaConfig")
            try self.policies?.validate(name: "\(name).policies")
            try self.validate(self.poolName, name: "poolName", parent: name, max: 128)
            try self.validate(self.poolName, name: "poolName", parent: name, min: 1)
            try self.validate(self.poolName, name: "poolName", parent: name, pattern: "^[\\w\\s+=,.@-]+$")
            try self.validate(self.smsAuthenticationMessage, name: "smsAuthenticationMessage", parent: name, max: 140)
            try self.validate(self.smsAuthenticationMessage, name: "smsAuthenticationMessage", parent: name, min: 6)
            try self.validate(self.smsAuthenticationMessage, name: "smsAuthenticationMessage", parent: name, pattern: "\\{####\\}")
            try self.smsConfiguration?.validate(name: "\(name).smsConfiguration")
            try self.validate(self.smsVerificationMessage, name: "smsVerificationMessage", parent: name, max: 140)
            try self.validate(self.smsVerificationMessage, name: "smsVerificationMessage", parent: name, min: 6)
            try self.validate(self.smsVerificationMessage, name: "smsVerificationMessage", parent: name, pattern: "\\{####\\}")
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, max: 55)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, min: 1)
            try self.validate(self.userPoolId, name: "userPoolId", parent: name, pattern: "^[\\w-]+_[0-9a-zA-Z]+$")
            try self.userPoolTags?.forEach {
                try validate($0.key, name: "userPoolTags.key", parent: name, max: 128)
                try validate($0.key, name: "userPoolTags.key", parent: name, min: 1)
                try validate($0.value, name: "userPoolTags[\"\($0.key)\"]", parent: name, max: 256)
            }
            try self.verificationMessageTemplate?.validate(name: "\(name).verificationMessageTemplate")
        }

        private enum CodingKeys: String, CodingKey {
            case accountRecoverySetting = "AccountRecoverySetting"
            case adminCreateUserConfig = "AdminCreateUserConfig"
            case autoVerifiedAttributes = "AutoVerifiedAttributes"
            case deletionProtection = "DeletionProtection"
            case deviceConfiguration = "DeviceConfiguration"
            case emailConfiguration = "EmailConfiguration"
            case emailVerificationMessage = "EmailVerificationMessage"
            case emailVerificationSubject = "EmailVerificationSubject"
            case lambdaConfig = "LambdaConfig"
            case mfaConfiguration = "MfaConfiguration"
            case policies = "Policies"
            case poolName = "PoolName"
            case smsAuthenticationMessage = "SmsAuthenticationMessage"
            case smsConfiguration = "SmsConfiguration"
            case smsVerificationMessage = "SmsVerificationMessage"
            case userAttributeUpdateSettings = "UserAttributeUpdateSettings"
            case userPoolAddOns = "UserPoolAddOns"
            case userPoolId = "UserPoolId"
            case userPoolTags = "UserPoolTags"
            case userPoolTier = "UserPoolTier"
            case verificationMessageTemplate = "VerificationMessageTemplate"
        }
    }

    public struct UpdateUserPoolResponse: AWSDecodableShape {
        public init() {}
    }

    public struct UserAttributeUpdateSettingsType: AWSEncodableShape & AWSDecodableShape {
        /// Requires that your user verifies their email address, phone number, or both before Amazon Cognito updates the value of that attribute. When you update a user attribute that has this option activated, Amazon Cognito sends a verification message to the new phone number or email address. Amazon Cognito doesn’t change the value of the attribute until your user responds to the verification message and confirms the new value. When AttributesRequireVerificationBeforeUpdate is false, your user pool doesn't require that your users verify attribute changes before Amazon Cognito updates them. In a user pool where AttributesRequireVerificationBeforeUpdate is false, API operations that change attribute values can immediately update a user’s email or phone_number attribute.
        public let attributesRequireVerificationBeforeUpdate: [VerifiedAttributeType]?

        @inlinable
        public init(attributesRequireVerificationBeforeUpdate: [VerifiedAttributeType]? = nil) {
            self.attributesRequireVerificationBeforeUpdate = attributesRequireVerificationBeforeUpdate
        }

        private enum CodingKeys: String, CodingKey {
            case attributesRequireVerificationBeforeUpdate = "AttributesRequireVerificationBeforeUpdate"
        }
    }

    public struct UserContextDataType: AWSEncodableShape {
        /// Encoded device-fingerprint details that your app collected with the Amazon Cognito context data collection library. For more information, see Adding user device and session data to API requests.
        public let encodedData: String?
        /// The source IP address of your user's device.
        public let ipAddress: String?

        @inlinable
        public init(encodedData: String? = nil, ipAddress: String? = nil) {
            self.encodedData = encodedData
            self.ipAddress = ipAddress
        }

        public func validate(name: String) throws {
            try self.validate(self.encodedData, name: "encodedData", parent: name, max: 131072)
            try self.validate(self.ipAddress, name: "ipAddress", parent: name, max: 131072)
        }

        private enum CodingKeys: String, CodingKey {
            case encodedData = "EncodedData"
            case ipAddress = "IpAddress"
        }
    }

    public struct UserImportJobType: AWSDecodableShape {
        /// The role Amazon Resource Name (ARN) for the Amazon CloudWatch Logging role for the user import job. For more information, see "Creating the CloudWatch Logs IAM Role" in the Amazon Cognito Developer Guide.
        public let cloudWatchLogsRoleArn: String?
        /// The date when the user import job was completed.
        public let completionDate: Date?
        /// The message returned when the user import job is completed.
        public let completionMessage: String?
        /// The date and time when the item was created. Amazon Cognito returns this timestamp in UNIX epoch time format. Your SDK might render the output in a
        /// human-readable format like ISO 8601 or a Java Date object.
        public let creationDate: Date?
        /// The number of users that couldn't be imported.
        public let failedUsers: Int64?
        /// The number of users that were successfully imported.
        public let importedUsers: Int64?
        /// The ID of the user import job.
        public let jobId: String?
        /// The friendly name of the user import job.
        public let jobName: String?
        /// The pre-signed URL target for uploading the CSV file.
        public let preSignedUrl: String?
        /// The number of users that were skipped.
        public let skippedUsers: Int64?
        /// The date when the user import job was started.
        public let startDate: Date?
        /// The status of the user import job. One of the following:    Created - The job was created but not started.    Pending - A transition state. You have started the job, but it has not begun importing users yet.    InProgress - The job has started, and users are being imported.    Stopping - You have stopped the job, but the job has not stopped importing users yet.    Stopped - You have stopped the job, and the job has stopped importing users.    Succeeded - The job has completed successfully.    Failed - The job has stopped due to an error.    Expired - You created a job, but did not start the job within 24-48 hours. All data associated with the job was deleted, and the job can't be started.
        public let status: UserImportJobStatusType?
        /// The ID of the user pool that the users are being imported into.
        public let userPoolId: String?

        @inlinable
        public init(cloudWatchLogsRoleArn: String? = nil, completionDate: Date? = nil, completionMessage: String? = nil, creationDate: Date? = nil, failedUsers: Int64? = nil, importedUsers: Int64? = nil, jobId: String? = nil, jobName: String? = nil, preSignedUrl: String? = nil, skippedUsers: Int64? = nil, startDate: Date? = nil, status: UserImportJobStatusType? = nil, userPoolId: String? = nil) {
            self.cloudWatchLogsRoleArn = cloudWatchLogsRoleArn
            self.completionDate = completionDate
            self.completionMessage = completionMessage
            self.creationDate = creationDate
            self.failedUsers = failedUsers
            self.importedUsers = importedUsers
            self.jobId = jobId
            self.jobName = jobName
            self.preSignedUrl = preSignedUrl
            self.skippedUsers = skippedUsers
            self.startDate = startDate
            self.status = status
            self.userPoolId = userPoolId
        }

        private enum CodingKeys: String, CodingKey {
            case cloudWatchLogsRoleArn = "CloudWatchLogsRoleArn"
            case completionDate = "CompletionDate"
            case completionMessage = "CompletionMessage"
            case creationDate = "CreationDate"
            case failedUsers = "FailedUsers"
            case importedUsers = "ImportedUsers"
            case jobId = "JobId"
            case jobName = "JobName"
            case preSignedUrl = "PreSignedUrl"
            case skippedUsers = "SkippedUsers"
            case startDate = "StartDate"
            case status = "Status"
            case userPoolId = "UserPoolId"
        }
    }

    public struct UserPoolAddOnsType: AWSEncodableShape & AWSDecodableShape {
        /// Threat protection configuration options for additional authentication types in your user pool, including custom authentication.
        public let advancedSecurityAdditionalFlows: AdvancedSecurityAdditionalFlowsType?
        /// The operating mode of threat protection for standard authentication types in your user pool, including username-password and secure remote password (SRP) authentication.
        public let advancedSecurityMode: AdvancedSecurityModeType

        @inlinable
        public init(advancedSecurityAdditionalFlows: AdvancedSecurityAdditionalFlowsType? = nil, advancedSecurityMode: AdvancedSecurityModeType) {
            self.advancedSecurityAdditionalFlows = advancedSecurityAdditionalFlows
            self.advancedSecurityMode = advancedSecurityMode
        }

        private enum CodingKeys: String, CodingKey {
            case advancedSecurityAdditionalFlows = "AdvancedSecurityAdditionalFlows"
            case advancedSecurityMode = "AdvancedSecurityMode"
        }
    }

    public struct UserPoolClientDescription: AWSDecodableShape {
        /// The app client ID.
        public let clientId: String?
        /// The app client name.
        public let clientName: String?
        /// The ID of the user pool that's associated with the app client.
        public let userPoolId: String?

        @inlinable
        public init(clientId: String? = nil, clientName: String? = nil, userPoolId: String? = nil) {
            self.clientId = clientId
            self.clientName = clientName
            self.userPoolId = userPoolId
        }

        private enum CodingKeys: String, CodingKey {
            case clientId = "ClientId"
            case clientName = "ClientName"
            case userPoolId = "UserPoolId"
        }
    }

    public struct UserPoolClientType: AWSDecodableShape {
        /// The access token time limit. After this limit expires, your user can't use
        /// their access token. To specify the time unit for AccessTokenValidity as
        /// seconds, minutes, hours, or days,
        /// set a TokenValidityUnits value in your API request. For example, when you set AccessTokenValidity to 10 and
        /// TokenValidityUnits to hours, your user can authorize access with
        /// their access token for 10 hours. The default time unit for AccessTokenValidity in an API request is hours.
        /// Valid range is displayed below in seconds. If you don't specify otherwise in the configuration of your app client, your access
        /// tokens are valid for one hour.
        public let accessTokenValidity: Int?
        /// The OAuth grant types that you want your app client to generate. To create an app client that generates client credentials grants, you must add client_credentials as the only allowed OAuth flow.  code  Use a code grant flow, which provides an authorization code as the response. This code can be exchanged for access tokens with the /oauth2/token endpoint.  implicit  Issue the access token (and, optionally, ID token, based on scopes) directly to your user.  client_credentials  Issue the access token from the /oauth2/token endpoint directly to a non-person user using a combination of the client ID and client secret.
        public let allowedOAuthFlows: [OAuthFlowType]?
        /// Set to true to use OAuth 2.0 authorization server features in your app client. This parameter must have a value of true before you can configure
        /// the following features in your app client.    CallBackURLs: Callback URLs.    LogoutURLs: Sign-out redirect URLs.    AllowedOAuthScopes: OAuth 2.0 scopes.    AllowedOAuthFlows: Support for authorization code, implicit, and client credentials OAuth 2.0 grants.   To use authorization server features, configure one of these features in the Amazon Cognito console or set
        /// AllowedOAuthFlowsUserPoolClient to true in a CreateUserPoolClient or
        /// UpdateUserPoolClient API request. If you don't set a value for
        /// AllowedOAuthFlowsUserPoolClient in a request with the CLI or SDKs, it defaults
        /// to false. When false, only SDK-based API sign-in is permitted.
        public let allowedOAuthFlowsUserPoolClient: Bool?
        /// The OAuth 2.0 scopes that you want your app client to support. Can include standard OAuth scopes like phone, email, openid, and profile. Can also include the aws.cognito.signin.user.admin scope that authorizes user profile self-service operations and custom scopes from resource servers.
        public let allowedOAuthScopes: [String]?
        /// The user pool analytics configuration for collecting metrics and sending them to your Amazon Pinpoint campaign.  In Amazon Web Services Regions where Amazon Pinpoint isn't available, user pools only support sending events to Amazon Pinpoint projects in Amazon Web Services Region us-east-1. In Regions where Amazon Pinpoint is available, user pools support sending events to Amazon Pinpoint projects within that same Region.
        public let analyticsConfiguration: AnalyticsConfigurationType?
        /// Amazon Cognito creates a session token for each API request in an authentication flow. AuthSessionValidity is the duration,
        /// in minutes, of that session token. Your user pool native user must respond to each authentication challenge before the session expires.
        public let authSessionValidity: Int?
        /// A list of allowed redirect (callback) URLs for the IdPs. A redirect URI must:   Be an absolute URI.   Be registered with the authorization server.   Not include a fragment component.   See OAuth 2.0 - Redirection Endpoint. Amazon Cognito requires HTTPS over HTTP except for http://localhost for testing purposes only. App callback URLs such as myapp://example are also supported.
        public let callbackURLs: [String]?
        /// The ID of the app client.
        public let clientId: String?
        /// The name of the app client.
        public let clientName: String?
        /// The app client secret.
        public let clientSecret: String?
        /// The date and time when the item was created. Amazon Cognito returns this timestamp in UNIX epoch time format. Your SDK might render the output in a
        /// human-readable format like ISO 8601 or a Java Date object.
        public let creationDate: Date?
        /// The default redirect URI. Must be in the CallbackURLs list. A redirect URI must:   Be an absolute URI.   Be registered with the authorization server.   Not include a fragment component.   See OAuth 2.0 - Redirection Endpoint. Amazon Cognito requires HTTPS over HTTP except for http://localhost for testing purposes only. App callback URLs such as myapp://example are also supported.
        public let defaultRedirectURI: String?
        /// When EnablePropagateAdditionalUserContextData is true, Amazon Cognito accepts an IpAddress value that you send in the UserContextData parameter. The UserContextData parameter sends information to Amazon Cognito threat protection for risk analysis. You can send UserContextData when you sign in Amazon Cognito native users with the InitiateAuth and RespondToAuthChallenge API operations. When EnablePropagateAdditionalUserContextData is false, you can't send your user's source IP address to Amazon Cognito threat protection with unauthenticated API operations. EnablePropagateAdditionalUserContextData doesn't affect whether you can send a source IP address in a ContextData parameter with the authenticated API operations AdminInitiateAuth and AdminRespondToAuthChallenge. You can only activate EnablePropagateAdditionalUserContextData in an app client that has a client secret. For more information about propagation of user context data, see Adding user device and session data to API requests.
        public let enablePropagateAdditionalUserContextData: Bool?
        /// Indicates whether token revocation is activated for the user pool client. When you create a new user pool client, token revocation is activated by default.
        public let enableTokenRevocation: Bool?
        /// The authentication flows that you want your user pool client to support. For each app
        /// client in your user pool, you can sign in your users with any combination of one or more flows, including with
        /// a user name and Secure Remote Password (SRP), a user name and password, or a custom authentication process that
        /// you define with Lambda functions.  If you don't specify a value for ExplicitAuthFlows, your app client supports
        /// ALLOW_REFRESH_TOKEN_AUTH, ALLOW_USER_SRP_AUTH, and ALLOW_CUSTOM_AUTH.
        ///   The values for authentication flow options include the following.    ALLOW_USER_AUTH: Enable selection-based sign-in with USER_AUTH. This setting covers username-password, secure remote password (SRP), passwordless, and passkey authentication. This authentiation flow can do username-password and SRP authentication without other ExplicitAuthFlows permitting them. For example users can complete an SRP challenge through USER_AUTH  without the flow USER_SRP_AUTH being active for the app client. This flow doesn't include CUSTOM_AUTH.  To activate this setting, your user pool must be in the  Essentials tier or higher.    ALLOW_ADMIN_USER_PASSWORD_AUTH: Enable admin based user password authentication flow ADMIN_USER_PASSWORD_AUTH. This setting replaces the ADMIN_NO_SRP_AUTH setting. With this authentication flow, your app passes a user name and password to Amazon Cognito in the request, instead of using the Secure  Remote Password (SRP) protocol to securely transmit the password.    ALLOW_CUSTOM_AUTH: Enable Lambda trigger based authentication.    ALLOW_USER_PASSWORD_AUTH: Enable user password-based authentication. In this flow, Amazon Cognito receives the password in the request instead of using the SRP protocol to verify passwords.    ALLOW_USER_SRP_AUTH: Enable SRP-based authentication.    ALLOW_REFRESH_TOKEN_AUTH: Enable authflow to refresh tokens.   In some environments, you will see the values ADMIN_NO_SRP_AUTH, CUSTOM_AUTH_FLOW_ONLY, or USER_PASSWORD_AUTH.
        /// You can't assign these legacy ExplicitAuthFlows values to user pool clients at the same time as values that begin with ALLOW_,
        /// like ALLOW_USER_SRP_AUTH.
        public let explicitAuthFlows: [ExplicitAuthFlowsType]?
        /// The ID token time limit. After this limit expires, your user can't use
        /// their ID token. To specify the time unit for IdTokenValidity as
        /// seconds, minutes, hours, or days,
        /// set a TokenValidityUnits value in your API request. For example, when you set IdTokenValidity as 10 and
        /// TokenValidityUnits as hours, your user can authenticate their
        /// session with their ID token for 10 hours. The default time unit for IdTokenValidity in an API request is hours.
        /// Valid range is displayed below in seconds. If you don't specify otherwise in the configuration of your app client, your ID
        /// tokens are valid for one hour.
        public let idTokenValidity: Int?
        /// The date and time when the item was modified. Amazon Cognito returns this timestamp in UNIX epoch time format. Your SDK might render the output in a
        /// human-readable format like ISO 8601 or a Java Date object.
        public let lastModifiedDate: Date?
        /// A list of allowed logout URLs for the IdPs.
        public let logoutURLs: [String]?
        /// When ENABLED, suppresses messages that might indicate a valid user exists  when someone attempts sign-in. This parameters sets your preference for the errors and  responses that you want Amazon Cognito APIs to return during authentication, account confirmation, and password recovery when the user doesn't exist in the user pool. When set to ENABLED and the user doesn't exist, authentication returns an error indicating either the username or password was incorrect. Account confirmation and password recovery return a response indicating a code was sent to a simulated destination. When set to LEGACY, those APIs return a UserNotFoundException exception if the user doesn't exist in the user pool. Defaults to LEGACY.
        public let preventUserExistenceErrors: PreventUserExistenceErrorTypes?
        /// The list of user attributes that you want your app client to have read access to. After your user authenticates in your app, their access token authorizes them to read their own attribute value for any attribute in this list. When you don't specify the ReadAttributes for your app client, your app can read the values of email_verified, phone_number_verified, and the standard attributes of your user pool. When your user pool app client has read access to these default attributes, ReadAttributes doesn't return any information. Amazon Cognito only populates ReadAttributes in the API response if you have specified your own custom set of read attributes.
        public let readAttributes: [String]?
        /// The configuration of your app client for refresh token rotation. When enabled, your app client issues new ID, access, and refresh tokens when users renew their sessions with refresh tokens. When disabled, token refresh issues only ID and access tokens.
        public let refreshTokenRotation: RefreshTokenRotationType?
        /// The refresh token time limit. After this limit expires, your user can't use
        /// their refresh token. To specify the time unit for RefreshTokenValidity as
        /// seconds, minutes, hours, or days,
        /// set a TokenValidityUnits value in your API request. For example, when you set RefreshTokenValidity as 10 and
        /// TokenValidityUnits as days, your user can refresh their session
        /// and retrieve new access and ID tokens for 10 days. The default time unit for RefreshTokenValidity in an API request is days.
        /// You can't set RefreshTokenValidity to 0. If you do, Amazon Cognito overrides the
        /// value with the default value of 30 days. Valid range is displayed below
        /// in seconds. If you don't specify otherwise in the configuration of your app client, your refresh
        /// tokens are valid for 30 days.
        public let refreshTokenValidity: Int?
        /// A list of provider names for the identity providers (IdPs) that are supported on this client. The following are supported: COGNITO, Facebook, Google, SignInWithApple, and LoginWithAmazon. You can also specify the names that you configured for the SAML and OIDC IdPs in your user pool, for example MySAMLIdP or MyOIDCIdP. This parameter sets the IdPs that managed  login will display on the login page for your app client. The removal of  COGNITO from this list doesn't prevent authentication operations  for local users with the user pools API in an Amazon Web Services SDK. The only way to prevent  SDK-based authentication is to block access with a WAF rule.
        public let supportedIdentityProviders: [String]?
        /// The time units that, with IdTokenValidity, AccessTokenValidity, and RefreshTokenValidity, set and display the duration of ID, access, and refresh tokens for an app client. You can assign a separate token validity unit to each type of token.
        public let tokenValidityUnits: TokenValidityUnitsType?
        /// The ID of the user pool associated with the app client.
        public let userPoolId: String?
        /// The list of user attributes that you want your app client to have write access to. After your user authenticates in your app, their access token authorizes them to set or modify their own attribute value for any attribute in this list. When you don't specify the WriteAttributes for your app client, your app can write the values of the Standard attributes of your user pool. When your user pool has write access to these default attributes, WriteAttributes doesn't return any information. Amazon Cognito only populates WriteAttributes in the API response if you have specified your own custom set of write attributes. If your app client allows users to sign in through an IdP, this array must include all attributes that you have mapped to IdP attributes. Amazon Cognito updates mapped attributes when users sign in to your application through an IdP. If your app client does not have write access to a mapped attribute, Amazon Cognito throws an error when it tries to update the attribute. For more information, see Specifying IdP Attribute Mappings for Your user pool.
        public let writeAttributes: [String]?

        @inlinable
        public init(accessTokenValidity: Int? = nil, allowedOAuthFlows: [OAuthFlowType]? = nil, allowedOAuthFlowsUserPoolClient: Bool? = nil, allowedOAuthScopes: [String]? = nil, analyticsConfiguration: AnalyticsConfigurationType? = nil, authSessionValidity: Int? = nil, callbackURLs: [String]? = nil, clientId: String? = nil, clientName: String? = nil, clientSecret: String? = nil, creationDate: Date? = nil, defaultRedirectURI: String? = nil, enablePropagateAdditionalUserContextData: Bool? = nil, enableTokenRevocation: Bool? = nil, explicitAuthFlows: [ExplicitAuthFlowsType]? = nil, idTokenValidity: Int? = nil, lastModifiedDate: Date? = nil, logoutURLs: [String]? = nil, preventUserExistenceErrors: PreventUserExistenceErrorTypes? = nil, readAttributes: [String]? = nil, refreshTokenRotation: RefreshTokenRotationType? = nil, refreshTokenValidity: Int? = nil, supportedIdentityProviders: [String]? = nil, tokenValidityUnits: TokenValidityUnitsType? = nil, userPoolId: String? = nil, writeAttributes: [String]? = nil) {
            self.accessTokenValidity = accessTokenValidity
            self.allowedOAuthFlows = allowedOAuthFlows
            self.allowedOAuthFlowsUserPoolClient = allowedOAuthFlowsUserPoolClient
            self.allowedOAuthScopes = allowedOAuthScopes
            self.analyticsConfiguration = analyticsConfiguration
            self.authSessionValidity = authSessionValidity
            self.callbackURLs = callbackURLs
            self.clientId = clientId
            self.clientName = clientName
            self.clientSecret = clientSecret
            self.creationDate = creationDate
            self.defaultRedirectURI = defaultRedirectURI
            self.enablePropagateAdditionalUserContextData = enablePropagateAdditionalUserContextData
            self.enableTokenRevocation = enableTokenRevocation
            self.explicitAuthFlows = explicitAuthFlows
            self.idTokenValidity = idTokenValidity
            self.lastModifiedDate = lastModifiedDate
            self.logoutURLs = logoutURLs
            self.preventUserExistenceErrors = preventUserExistenceErrors
            self.readAttributes = readAttributes
            self.refreshTokenRotation = refreshTokenRotation
            self.refreshTokenValidity = refreshTokenValidity
            self.supportedIdentityProviders = supportedIdentityProviders
            self.tokenValidityUnits = tokenValidityUnits
            self.userPoolId = userPoolId
            self.writeAttributes = writeAttributes
        }

        private enum CodingKeys: String, CodingKey {
            case accessTokenValidity = "AccessTokenValidity"
            case allowedOAuthFlows = "AllowedOAuthFlows"
            case allowedOAuthFlowsUserPoolClient = "AllowedOAuthFlowsUserPoolClient"
            case allowedOAuthScopes = "AllowedOAuthScopes"
            case analyticsConfiguration = "AnalyticsConfiguration"
            case authSessionValidity = "AuthSessionValidity"
            case callbackURLs = "CallbackURLs"
            case clientId = "ClientId"
            case clientName = "ClientName"
            case clientSecret = "ClientSecret"
            case creationDate = "CreationDate"
            case defaultRedirectURI = "DefaultRedirectURI"
            case enablePropagateAdditionalUserContextData = "EnablePropagateAdditionalUserContextData"
            case enableTokenRevocation = "EnableTokenRevocation"
            case explicitAuthFlows = "ExplicitAuthFlows"
            case idTokenValidity = "IdTokenValidity"
            case lastModifiedDate = "LastModifiedDate"
            case logoutURLs = "LogoutURLs"
            case preventUserExistenceErrors = "PreventUserExistenceErrors"
            case readAttributes = "ReadAttributes"
            case refreshTokenRotation = "RefreshTokenRotation"
            case refreshTokenValidity = "RefreshTokenValidity"
            case supportedIdentityProviders = "SupportedIdentityProviders"
            case tokenValidityUnits = "TokenValidityUnits"
            case userPoolId = "UserPoolId"
            case writeAttributes = "WriteAttributes"
        }
    }

    public struct UserPoolDescriptionType: AWSDecodableShape {
        /// The date and time when the item was created. Amazon Cognito returns this timestamp in UNIX epoch time format. Your SDK might render the output in a
        /// human-readable format like ISO 8601 or a Java Date object.
        public let creationDate: Date?
        /// The user pool ID.
        public let id: String?
        /// A collection of user pool Lambda triggers. Amazon Cognito invokes triggers at several possible stages of user pool operations. Triggers can modify the outcome of the operations that invoked them.
        public let lambdaConfig: LambdaConfigType?
        /// The date and time when the item was modified. Amazon Cognito returns this timestamp in UNIX epoch time format. Your SDK might render the output in a
        /// human-readable format like ISO 8601 or a Java Date object.
        public let lastModifiedDate: Date?
        /// The user pool name.
        public let name: String?
        /// The user pool status.
        public let status: StatusType?

        @inlinable
        public init(creationDate: Date? = nil, id: String? = nil, lambdaConfig: LambdaConfigType? = nil, lastModifiedDate: Date? = nil, name: String? = nil) {
            self.creationDate = creationDate
            self.id = id
            self.lambdaConfig = lambdaConfig
            self.lastModifiedDate = lastModifiedDate
            self.name = name
            self.status = nil
        }

        @available(*, deprecated, message: "Members status have been deprecated")
        @inlinable
        public init(creationDate: Date? = nil, id: String? = nil, lambdaConfig: LambdaConfigType? = nil, lastModifiedDate: Date? = nil, name: String? = nil, status: StatusType? = nil) {
            self.creationDate = creationDate
            self.id = id
            self.lambdaConfig = lambdaConfig
            self.lastModifiedDate = lastModifiedDate
            self.name = name
            self.status = status
        }

        private enum CodingKeys: String, CodingKey {
            case creationDate = "CreationDate"
            case id = "Id"
            case lambdaConfig = "LambdaConfig"
            case lastModifiedDate = "LastModifiedDate"
            case name = "Name"
            case status = "Status"
        }
    }

    public struct UserPoolPolicyType: AWSEncodableShape & AWSDecodableShape {
        /// The password policy settings for a user pool, including complexity, history, and length requirements.
        public let passwordPolicy: PasswordPolicyType?
        /// The policy for allowed types of authentication in a user pool.
        public let signInPolicy: SignInPolicyType?

        @inlinable
        public init(passwordPolicy: PasswordPolicyType? = nil, signInPolicy: SignInPolicyType? = nil) {
            self.passwordPolicy = passwordPolicy
            self.signInPolicy = signInPolicy
        }

        public func validate(name: String) throws {
            try self.passwordPolicy?.validate(name: "\(name).passwordPolicy")
            try self.signInPolicy?.validate(name: "\(name).signInPolicy")
        }

        private enum CodingKeys: String, CodingKey {
            case passwordPolicy = "PasswordPolicy"
            case signInPolicy = "SignInPolicy"
        }
    }

    public struct UserPoolType: AWSDecodableShape {
        /// The available verified method a user can use to recover their password when they call ForgotPassword. You can use this setting to define a preferred method when a user has more than one method available. With this setting, SMS doesn't qualify for a valid password recovery mechanism if the user also has SMS multi-factor authentication (MFA) activated. In the absence of this setting, Amazon Cognito uses the legacy behavior to determine the recovery method where SMS is preferred through email.
        public let accountRecoverySetting: AccountRecoverySettingType?
        /// The configuration for AdminCreateUser requests.
        public let adminCreateUserConfig: AdminCreateUserConfigType?
        /// Attributes supported as an alias for this user pool. An alias is an attribute that users can enter as an alternative username. Possible values: phone_number, email, or preferred_username.
        public let aliasAttributes: [AliasAttributeType]?
        /// The Amazon Resource Name (ARN) of the user pool.
        public let arn: String?
        /// The attributes that are auto-verified in a user pool.
        public let autoVerifiedAttributes: [VerifiedAttributeType]?
        /// The date and time when the item was created. Amazon Cognito returns this timestamp in UNIX epoch time format. Your SDK might render the output in a
        /// human-readable format like ISO 8601 or a Java Date object.
        public let creationDate: Date?
        /// A custom domain name that you provide to Amazon Cognito. This parameter applies only if you use a custom domain to host the sign-up and sign-in pages for your application. An example of a custom domain name might be auth.example.com. For more information about adding a custom domain to your user pool, see Using Your Own Domain for the Hosted UI.
        public let customDomain: String?
        /// When active, DeletionProtection prevents accidental deletion of your user
        /// pool. Before you can delete a user pool that you have protected against deletion, you
        /// must deactivate this feature. When you try to delete a protected user pool in a DeleteUserPool API request,
        /// Amazon Cognito returns an InvalidParameterException error. To delete a protected user pool,
        /// send a new DeleteUserPool request after you deactivate deletion protection in an
        /// UpdateUserPool API request.
        public let deletionProtection: DeletionProtectionType?
        /// The device-remembering configuration for a user pool. A null value indicates that you have deactivated device remembering in your user pool.  When you provide a value for any DeviceConfiguration field, you activate the Amazon Cognito device-remembering feature.
        public let deviceConfiguration: DeviceConfigurationType?
        /// The domain prefix, if the user pool has a domain associated with it.
        public let domain: String?
        /// The email configuration of your user pool. The email configuration type sets your preferred sending method, Amazon Web Services Region, and sender for messages from your user pool.
        public let emailConfiguration: EmailConfigurationType?
        /// Deprecated. Review error codes from API requests with EventSource:cognito-idp.amazonaws.com in CloudTrail for information about problems with user pool email configuration.
        public let emailConfigurationFailure: String?
        /// This parameter is no longer used.
        public let emailVerificationMessage: String?
        /// This parameter is no longer used.
        public let emailVerificationSubject: String?
        /// A number estimating the size of the user pool.
        public let estimatedNumberOfUsers: Int?
        /// The ID of the user pool.
        public let id: String?
        /// A collection of user pool Lambda triggers. Amazon Cognito invokes triggers at several possible stages of user pool operations. Triggers can modify the outcome of the operations that invoked them.
        public let lambdaConfig: LambdaConfigType?
        /// The date and time when the item was modified. Amazon Cognito returns this timestamp in UNIX epoch time format. Your SDK might render the output in a
        /// human-readable format like ISO 8601 or a Java Date object.
        public let lastModifiedDate: Date?
        /// Can be one of the following values:    OFF - MFA tokens aren't required and can't be specified during user registration.    ON - MFA tokens are required for all user registrations. You can only specify required when you're initially creating a user pool.    OPTIONAL - Users have the option when registering to create an MFA token.
        public let mfaConfiguration: UserPoolMfaType?
        /// The name of the user pool.
        public let name: String?
        /// A list of user pool policies. Contains the policy that sets password-complexity requirements.
        public let policies: UserPoolPolicyType?
        /// A list of the user attributes and their properties in your user pool. The attribute schema contains standard attributes, custom attributes with a custom: prefix, and developer attributes with a dev: prefix. For more information, see User pool attributes. Developer-only attributes are a legacy feature of user pools, and are read-only to all app clients. You can create and update developer-only attributes only with IAM-authenticated API operations. Use app client read/write permissions instead.
        public let schemaAttributes: [SchemaAttributeType]?
        /// The contents of the SMS authentication message.
        public let smsAuthenticationMessage: String?
        /// User pool configuration for delivery of SMS messages with Amazon Simple Notification Service. To send SMS messages with Amazon SNS in the Amazon Web Services Region that you want, the Amazon Cognito user pool uses an Identity and Access Management (IAM) role in your Amazon Web Services account.
        public let smsConfiguration: SmsConfigurationType?
        /// The reason why the SMS configuration can't send the messages to your users. This message might include comma-separated values to describe why your SMS configuration can't send messages to user pool end users.  InvalidSmsRoleAccessPolicyException  The Identity and Access Management role that Amazon Cognito uses to send SMS messages isn't properly configured. For more information, see SmsConfigurationType.  SNSSandbox  The Amazon Web Services account is in the SNS SMS Sandbox and messages will only reach verified end users. This parameter won’t get populated with SNSSandbox if the user creating the user pool doesn’t have SNS permissions. To learn how to move your Amazon Web Services account out of the sandbox, see Moving out of the SMS sandbox.
        public let smsConfigurationFailure: String?
        /// This parameter is no longer used.
        public let smsVerificationMessage: String?
        /// This parameter is no longer used.
        public let status: StatusType?
        /// The settings for updates to user attributes. These settings include the property AttributesRequireVerificationBeforeUpdate,
        /// a user-pool setting that tells Amazon Cognito how to handle changes to the value of your users' email address and phone number attributes. For
        /// more information, see
        /// Verifying updates to email addresses and phone numbers.
        public let userAttributeUpdateSettings: UserAttributeUpdateSettingsType?
        /// Specifies whether a user can use an email address or phone number as a username when they sign up.
        public let usernameAttributes: [UsernameAttributeType]?
        /// Case sensitivity of the username input for the selected sign-in option. When case sensitivity is set to False (case insensitive), users can sign in with any combination of capital and lowercase letters. For example, username, USERNAME, or UserName, or for email, email@example.com or EMaiL@eXamplE.Com. For most use cases, set case sensitivity to False (case insensitive) as a best practice. When usernames and email addresses are case insensitive, Amazon Cognito treats any variation in case as the same user, and prevents a case variation from being assigned to the same attribute for a different user.
        public let usernameConfiguration: UsernameConfigurationType?
        /// Contains settings for activation of threat protection, including the operating
        /// mode and additional authentication types. To log user security information but take
        /// no action, set to AUDIT. To configure automatic security responses to
        /// potentially unwanted traffic to your user pool, set to ENFORCED. For more information, see Adding advanced security to a user pool. To activate this setting, your user pool must be on the  Plus tier.
        public let userPoolAddOns: UserPoolAddOnsType?
        /// The tags that are assigned to the user pool. A tag is a label that you can apply to user pools to categorize and manage them in different ways, such as by purpose, owner, environment, or other criteria.
        public let userPoolTags: [String: String]?
        /// The user pool feature plan, or tier. This parameter determines the eligibility of the user pool for features like managed login, access-token customization, and threat protection. Defaults to ESSENTIALS.
        public let userPoolTier: UserPoolTierType?
        /// The template for the verification message that your user pool delivers to users who set an email address or phone number attribute.
        public let verificationMessageTemplate: VerificationMessageTemplateType?

        @inlinable
        public init(accountRecoverySetting: AccountRecoverySettingType? = nil, adminCreateUserConfig: AdminCreateUserConfigType? = nil, aliasAttributes: [AliasAttributeType]? = nil, arn: String? = nil, autoVerifiedAttributes: [VerifiedAttributeType]? = nil, creationDate: Date? = nil, customDomain: String? = nil, deletionProtection: DeletionProtectionType? = nil, deviceConfiguration: DeviceConfigurationType? = nil, domain: String? = nil, emailConfiguration: EmailConfigurationType? = nil, emailConfigurationFailure: String? = nil, emailVerificationMessage: String? = nil, emailVerificationSubject: String? = nil, estimatedNumberOfUsers: Int? = nil, id: String? = nil, lambdaConfig: LambdaConfigType? = nil, lastModifiedDate: Date? = nil, mfaConfiguration: UserPoolMfaType? = nil, name: String? = nil, policies: UserPoolPolicyType? = nil, schemaAttributes: [SchemaAttributeType]? = nil, smsAuthenticationMessage: String? = nil, smsConfiguration: SmsConfigurationType? = nil, smsConfigurationFailure: String? = nil, smsVerificationMessage: String? = nil, userAttributeUpdateSettings: UserAttributeUpdateSettingsType? = nil, usernameAttributes: [UsernameAttributeType]? = nil, usernameConfiguration: UsernameConfigurationType? = nil, userPoolAddOns: UserPoolAddOnsType? = nil, userPoolTags: [String: String]? = nil, userPoolTier: UserPoolTierType? = nil, verificationMessageTemplate: VerificationMessageTemplateType? = nil) {
            self.accountRecoverySetting = accountRecoverySetting
            self.adminCreateUserConfig = adminCreateUserConfig
            self.aliasAttributes = aliasAttributes
            self.arn = arn
            self.autoVerifiedAttributes = autoVerifiedAttributes
            self.creationDate = creationDate
            self.customDomain = customDomain
            self.deletionProtection = deletionProtection
            self.deviceConfiguration = deviceConfiguration
            self.domain = domain
            self.emailConfiguration = emailConfiguration
            self.emailConfigurationFailure = emailConfigurationFailure
            self.emailVerificationMessage = emailVerificationMessage
            self.emailVerificationSubject = emailVerificationSubject
            self.estimatedNumberOfUsers = estimatedNumberOfUsers
            self.id = id
            self.lambdaConfig = lambdaConfig
            self.lastModifiedDate = lastModifiedDate
            self.mfaConfiguration = mfaConfiguration
            self.name = name
            self.policies = policies
            self.schemaAttributes = schemaAttributes
            self.smsAuthenticationMessage = smsAuthenticationMessage
            self.smsConfiguration = smsConfiguration
            self.smsConfigurationFailure = smsConfigurationFailure
            self.smsVerificationMessage = smsVerificationMessage
            self.status = nil
            self.userAttributeUpdateSettings = userAttributeUpdateSettings
            self.usernameAttributes = usernameAttributes
            self.usernameConfiguration = usernameConfiguration
            self.userPoolAddOns = userPoolAddOns
            self.userPoolTags = userPoolTags
            self.userPoolTier = userPoolTier
            self.verificationMessageTemplate = verificationMessageTemplate
        }

        @available(*, deprecated, message: "Members status have been deprecated")
        @inlinable
        public init(accountRecoverySetting: AccountRecoverySettingType? = nil, adminCreateUserConfig: AdminCreateUserConfigType? = nil, aliasAttributes: [AliasAttributeType]? = nil, arn: String? = nil, autoVerifiedAttributes: [VerifiedAttributeType]? = nil, creationDate: Date? = nil, customDomain: String? = nil, deletionProtection: DeletionProtectionType? = nil, deviceConfiguration: DeviceConfigurationType? = nil, domain: String? = nil, emailConfiguration: EmailConfigurationType? = nil, emailConfigurationFailure: String? = nil, emailVerificationMessage: String? = nil, emailVerificationSubject: String? = nil, estimatedNumberOfUsers: Int? = nil, id: String? = nil, lambdaConfig: LambdaConfigType? = nil, lastModifiedDate: Date? = nil, mfaConfiguration: UserPoolMfaType? = nil, name: String? = nil, policies: UserPoolPolicyType? = nil, schemaAttributes: [SchemaAttributeType]? = nil, smsAuthenticationMessage: String? = nil, smsConfiguration: SmsConfigurationType? = nil, smsConfigurationFailure: String? = nil, smsVerificationMessage: String? = nil, status: StatusType? = nil, userAttributeUpdateSettings: UserAttributeUpdateSettingsType? = nil, usernameAttributes: [UsernameAttributeType]? = nil, usernameConfiguration: UsernameConfigurationType? = nil, userPoolAddOns: UserPoolAddOnsType? = nil, userPoolTags: [String: String]? = nil, userPoolTier: UserPoolTierType? = nil, verificationMessageTemplate: VerificationMessageTemplateType? = nil) {
            self.accountRecoverySetting = accountRecoverySetting
            self.adminCreateUserConfig = adminCreateUserConfig
            self.aliasAttributes = aliasAttributes
            self.arn = arn
            self.autoVerifiedAttributes = autoVerifiedAttributes
            self.creationDate = creationDate
            self.customDomain = customDomain
            self.deletionProtection = deletionProtection
            self.deviceConfiguration = deviceConfiguration
            self.domain = domain
            self.emailConfiguration = emailConfiguration
            self.emailConfigurationFailure = emailConfigurationFailure
            self.emailVerificationMessage = emailVerificationMessage
            self.emailVerificationSubject = emailVerificationSubject
            self.estimatedNumberOfUsers = estimatedNumberOfUsers
            self.id = id
            self.lambdaConfig = lambdaConfig
            self.lastModifiedDate = lastModifiedDate
            self.mfaConfiguration = mfaConfiguration
            self.name = name
            self.policies = policies
            self.schemaAttributes = schemaAttributes
            self.smsAuthenticationMessage = smsAuthenticationMessage
            self.smsConfiguration = smsConfiguration
            self.smsConfigurationFailure = smsConfigurationFailure
            self.smsVerificationMessage = smsVerificationMessage
            self.status = status
            self.userAttributeUpdateSettings = userAttributeUpdateSettings
            self.usernameAttributes = usernameAttributes
            self.usernameConfiguration = usernameConfiguration
            self.userPoolAddOns = userPoolAddOns
            self.userPoolTags = userPoolTags
            self.userPoolTier = userPoolTier
            self.verificationMessageTemplate = verificationMessageTemplate
        }

        private enum CodingKeys: String, CodingKey {
            case accountRecoverySetting = "AccountRecoverySetting"
            case adminCreateUserConfig = "AdminCreateUserConfig"
            case aliasAttributes = "AliasAttributes"
            case arn = "Arn"
            case autoVerifiedAttributes = "AutoVerifiedAttributes"
            case creationDate = "CreationDate"
            case customDomain = "CustomDomain"
            case deletionProtection = "DeletionProtection"
            case deviceConfiguration = "DeviceConfiguration"
            case domain = "Domain"
            case emailConfiguration = "EmailConfiguration"
            case emailConfigurationFailure = "EmailConfigurationFailure"
            case emailVerificationMessage = "EmailVerificationMessage"
            case emailVerificationSubject = "EmailVerificationSubject"
            case estimatedNumberOfUsers = "EstimatedNumberOfUsers"
            case id = "Id"
            case lambdaConfig = "LambdaConfig"
            case lastModifiedDate = "LastModifiedDate"
            case mfaConfiguration = "MfaConfiguration"
            case name = "Name"
            case policies = "Policies"
            case schemaAttributes = "SchemaAttributes"
            case smsAuthenticationMessage = "SmsAuthenticationMessage"
            case smsConfiguration = "SmsConfiguration"
            case smsConfigurationFailure = "SmsConfigurationFailure"
            case smsVerificationMessage = "SmsVerificationMessage"
            case status = "Status"
            case userAttributeUpdateSettings = "UserAttributeUpdateSettings"
            case usernameAttributes = "UsernameAttributes"
            case usernameConfiguration = "UsernameConfiguration"
            case userPoolAddOns = "UserPoolAddOns"
            case userPoolTags = "UserPoolTags"
            case userPoolTier = "UserPoolTier"
            case verificationMessageTemplate = "VerificationMessageTemplate"
        }
    }

    public struct UserType: AWSDecodableShape {
        /// Names and values of a user's attributes, for example email.
        public let attributes: [AttributeType]?
        /// Indicates whether the user's account is enabled or disabled.
        public let enabled: Bool?
        /// The user's MFA configuration.
        public let mfaOptions: [MFAOptionType]?
        /// The date and time when the item was created. Amazon Cognito returns this timestamp in UNIX epoch time format. Your SDK might render the output in a
        /// human-readable format like ISO 8601 or a Java Date object.
        public let userCreateDate: Date?
        /// The date and time when the item was modified. Amazon Cognito returns this timestamp in UNIX epoch time format. Your SDK might render the output in a
        /// human-readable format like ISO 8601 or a Java Date object.
        public let userLastModifiedDate: Date?
        /// The user's username.
        public let username: String?
        /// The user status. This can be one of the following:    UNCONFIRMED: User has been created but not confirmed.    CONFIRMED: User has been confirmed.    EXTERNAL_PROVIDER: User signed in with a third-party IdP.    RESET_REQUIRED: User is confirmed, but the user must request a code and reset their password before they can sign in.    FORCE_CHANGE_PASSWORD: The user is confirmed and the user can sign in using a temporary password, but on first sign-in, the user must change their password to a new value before doing anything else.    The statuses ARCHIVED, UNKNOWN, and COMPROMISED are no longer used.
        public let userStatus: UserStatusType?

        @inlinable
        public init(attributes: [AttributeType]? = nil, enabled: Bool? = nil, mfaOptions: [MFAOptionType]? = nil, userCreateDate: Date? = nil, userLastModifiedDate: Date? = nil, username: String? = nil, userStatus: UserStatusType? = nil) {
            self.attributes = attributes
            self.enabled = enabled
            self.mfaOptions = mfaOptions
            self.userCreateDate = userCreateDate
            self.userLastModifiedDate = userLastModifiedDate
            self.username = username
            self.userStatus = userStatus
        }

        private enum CodingKeys: String, CodingKey {
            case attributes = "Attributes"
            case enabled = "Enabled"
            case mfaOptions = "MFAOptions"
            case userCreateDate = "UserCreateDate"
            case userLastModifiedDate = "UserLastModifiedDate"
            case username = "Username"
            case userStatus = "UserStatus"
        }
    }

    public struct UsernameConfigurationType: AWSEncodableShape & AWSDecodableShape {
        /// Specifies whether user name case sensitivity will be applied for all users in the user pool through Amazon Cognito APIs. For most use cases, set case sensitivity to False (case insensitive) as a best practice. When usernames and email addresses are case insensitive, users can sign in as the same user when they enter a different capitalization of their user name. Valid values include:  true  Enables case sensitivity for all username input. When this option is set to true, users must sign in using the exact capitalization of their given username, such as “UserName”. This is the default value.  false  Enables case insensitivity for all username input. For example, when this option is set to false, users can sign in using username, USERNAME, or UserName. This option also enables both preferred_username and email alias to be case insensitive, in addition to the username attribute.
        public let caseSensitive: Bool

        @inlinable
        public init(caseSensitive: Bool) {
            self.caseSensitive = caseSensitive
        }

        private enum CodingKeys: String, CodingKey {
            case caseSensitive = "CaseSensitive"
        }
    }

    public struct VerificationMessageTemplateType: AWSEncodableShape & AWSDecodableShape {
        /// The configuration of verification emails to contain a clickable link or a verification code. For link, your template body must contain link text in the format {##Click here##}. "Click here" in the example is a customizable string. For code, your template body must contain a code placeholder in the format {####}.
        public let defaultEmailOption: DefaultEmailOptionType?
        /// The template for email messages that Amazon Cognito sends to your users. You can set an EmailMessage template only if the value of  EmailSendingAccount is DEVELOPER. When your EmailSendingAccount is DEVELOPER, your user pool sends email messages with your own Amazon SES configuration.
        public let emailMessage: String?
        /// The email message template for sending a confirmation link to the user. You can set an EmailMessageByLink template only if the value of  EmailSendingAccount is DEVELOPER. When your EmailSendingAccount is DEVELOPER, your user pool sends email messages with your own Amazon SES configuration.
        public let emailMessageByLink: String?
        /// The subject line for the email message template. You can set an EmailSubject template only if the value of  EmailSendingAccount is DEVELOPER. When your EmailSendingAccount is DEVELOPER, your user pool sends email messages with your own Amazon SES configuration.
        public let emailSubject: String?
        /// The subject line for the email message template for sending a confirmation link to the user. You can set an EmailSubjectByLink template only if the value of EmailSendingAccount is DEVELOPER. When your EmailSendingAccount is DEVELOPER, your user pool sends email messages with your own Amazon SES configuration.
        public let emailSubjectByLink: String?
        /// The template for SMS messages that Amazon Cognito sends to your users.
        public let smsMessage: String?

        @inlinable
        public init(defaultEmailOption: DefaultEmailOptionType? = nil, emailMessage: String? = nil, emailMessageByLink: String? = nil, emailSubject: String? = nil, emailSubjectByLink: String? = nil, smsMessage: String? = nil) {
            self.defaultEmailOption = defaultEmailOption
            self.emailMessage = emailMessage
            self.emailMessageByLink = emailMessageByLink
            self.emailSubject = emailSubject
            self.emailSubjectByLink = emailSubjectByLink
            self.smsMessage = smsMessage
        }

        public func validate(name: String) throws {
            try self.validate(self.emailMessage, name: "emailMessage", parent: name, max: 20000)
            try self.validate(self.emailMessage, name: "emailMessage", parent: name, min: 6)
            try self.validate(self.emailMessage, name: "emailMessage", parent: name, pattern: "^[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}\\s*]*\\{####\\}[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}\\s*]*$")
            try self.validate(self.emailMessageByLink, name: "emailMessageByLink", parent: name, max: 20000)
            try self.validate(self.emailMessageByLink, name: "emailMessageByLink", parent: name, min: 6)
            try self.validate(self.emailMessageByLink, name: "emailMessageByLink", parent: name, pattern: "^[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}\\s*]*\\{##[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}\\s*]*##\\}[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}\\s*]*$")
            try self.validate(self.emailSubject, name: "emailSubject", parent: name, max: 140)
            try self.validate(self.emailSubject, name: "emailSubject", parent: name, min: 1)
            try self.validate(self.emailSubject, name: "emailSubject", parent: name, pattern: "^[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}\\s]+$")
            try self.validate(self.emailSubjectByLink, name: "emailSubjectByLink", parent: name, max: 140)
            try self.validate(self.emailSubjectByLink, name: "emailSubjectByLink", parent: name, min: 1)
            try self.validate(self.emailSubjectByLink, name: "emailSubjectByLink", parent: name, pattern: "^[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}\\s]+$")
            try self.validate(self.smsMessage, name: "smsMessage", parent: name, max: 140)
            try self.validate(self.smsMessage, name: "smsMessage", parent: name, min: 6)
            try self.validate(self.smsMessage, name: "smsMessage", parent: name, pattern: "\\{####\\}")
        }

        private enum CodingKeys: String, CodingKey {
            case defaultEmailOption = "DefaultEmailOption"
            case emailMessage = "EmailMessage"
            case emailMessageByLink = "EmailMessageByLink"
            case emailSubject = "EmailSubject"
            case emailSubjectByLink = "EmailSubjectByLink"
            case smsMessage = "SmsMessage"
        }
    }

    public struct VerifySoftwareTokenRequest: AWSEncodableShape {
        /// A valid access token that Amazon Cognito issued to the currently signed-in user. Must include a scope claim for
        /// aws.cognito.signin.user.admin.
        public let accessToken: String?
        /// A friendly name for the device that's running the TOTP authenticator.
        public let friendlyDeviceName: String?
        /// The session ID from an AssociateSoftwareToken request.
        public let session: String?
        /// A TOTP that the user generated in their configured authenticator app.
        public let userCode: String

        @inlinable
        public init(accessToken: String? = nil, friendlyDeviceName: String? = nil, session: String? = nil, userCode: String) {
            self.accessToken = accessToken
            self.friendlyDeviceName = friendlyDeviceName
            self.session = session
            self.userCode = userCode
        }

        public func validate(name: String) throws {
            try self.validate(self.accessToken, name: "accessToken", parent: name, pattern: "^[A-Za-z0-9-_=.]+$")
            try self.validate(self.friendlyDeviceName, name: "friendlyDeviceName", parent: name, max: 131072)
            try self.validate(self.session, name: "session", parent: name, max: 2048)
            try self.validate(self.session, name: "session", parent: name, min: 20)
            try self.validate(self.userCode, name: "userCode", parent: name, max: 6)
            try self.validate(self.userCode, name: "userCode", parent: name, min: 6)
            try self.validate(self.userCode, name: "userCode", parent: name, pattern: "^[0-9]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case accessToken = "AccessToken"
            case friendlyDeviceName = "FriendlyDeviceName"
            case session = "Session"
            case userCode = "UserCode"
        }
    }

    public struct VerifySoftwareTokenResponse: AWSDecodableShape {
        /// This session ID satisfies an MFA_SETUP challenge. Supply the session ID in your challenge response.
        public let session: String?
        /// Amazon Cognito can accept or reject the code that you provide. This response parameter indicates the success of TOTP verification. Some reasons that this operation might return an error are clock skew on the user's device and excessive retries.
        public let status: VerifySoftwareTokenResponseType?

        @inlinable
        public init(session: String? = nil, status: VerifySoftwareTokenResponseType? = nil) {
            self.session = session
            self.status = status
        }

        private enum CodingKeys: String, CodingKey {
            case session = "Session"
            case status = "Status"
        }
    }

    public struct VerifyUserAttributeRequest: AWSEncodableShape {
        /// A valid access token that Amazon Cognito issued to the currently signed-in user. Must include a scope claim for
        /// aws.cognito.signin.user.admin.
        public let accessToken: String
        /// The name of the attribute that you want to verify.
        public let attributeName: String
        /// The verification code that your user pool sent to the added or changed attribute, for example the user's email address.
        public let code: String

        @inlinable
        public init(accessToken: String, attributeName: String, code: String) {
            self.accessToken = accessToken
            self.attributeName = attributeName
            self.code = code
        }

        public func validate(name: String) throws {
            try self.validate(self.accessToken, name: "accessToken", parent: name, pattern: "^[A-Za-z0-9-_=.]+$")
            try self.validate(self.attributeName, name: "attributeName", parent: name, max: 32)
            try self.validate(self.attributeName, name: "attributeName", parent: name, min: 1)
            try self.validate(self.attributeName, name: "attributeName", parent: name, pattern: "^[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}]+$")
            try self.validate(self.code, name: "code", parent: name, max: 2048)
            try self.validate(self.code, name: "code", parent: name, min: 1)
            try self.validate(self.code, name: "code", parent: name, pattern: "^[\\S]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case accessToken = "AccessToken"
            case attributeName = "AttributeName"
            case code = "Code"
        }
    }

    public struct VerifyUserAttributeResponse: AWSDecodableShape {
        public init() {}
    }

    public struct WebAuthnConfigurationType: AWSEncodableShape & AWSDecodableShape {
        /// Sets or displays the authentication domain, typically your user pool domain, that passkey providers must use as a relying party (RP) in their configuration. Under the following conditions, the passkey relying party ID must be the fully-qualified domain name of your custom domain:   The user pool is configured for passkey authentication.   The user pool has a custom domain, whether or not it also has a prefix domain.   Your application performs authentication with managed login or the classic hosted UI.
        public let relyingPartyId: String?
        /// When required, users can only register and sign in users with passkeys that are capable of user verification. When preferred, your user pool doesn't require the use of authenticators with user verification but encourages it.
        public let userVerification: UserVerificationType?

        @inlinable
        public init(relyingPartyId: String? = nil, userVerification: UserVerificationType? = nil) {
            self.relyingPartyId = relyingPartyId
            self.userVerification = userVerification
        }

        public func validate(name: String) throws {
            try self.validate(self.relyingPartyId, name: "relyingPartyId", parent: name, max: 127)
            try self.validate(self.relyingPartyId, name: "relyingPartyId", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case relyingPartyId = "RelyingPartyId"
            case userVerification = "UserVerification"
        }
    }

    public struct WebAuthnCredentialDescription: AWSDecodableShape {
        /// The general category of the passkey authenticator. Can be a platform, or on-device authenticator like a built-in fingerprint scanner, or a cross-platform device that's not attached to the device like a Bluetooth security key.
        public let authenticatorAttachment: String?
        /// Information about the transport methods of the passkey credential, for example USB or Bluetooth Low Energy.
        public let authenticatorTransports: [String]
        /// The date and time when the item was created. Amazon Cognito returns this timestamp in UNIX epoch time format. Your SDK might render the output in a
        /// human-readable format like ISO 8601 or a Java Date object.
        public let createdAt: Date
        /// The unique identifier of the passkey credential.
        public let credentialId: String
        /// An automatically-generated friendly name for the passkey credential.
        public let friendlyCredentialName: String
        /// The relying-party ID of the provider for the passkey credential.
        public let relyingPartyId: String

        @inlinable
        public init(authenticatorAttachment: String? = nil, authenticatorTransports: [String], createdAt: Date, credentialId: String, friendlyCredentialName: String, relyingPartyId: String) {
            self.authenticatorAttachment = authenticatorAttachment
            self.authenticatorTransports = authenticatorTransports
            self.createdAt = createdAt
            self.credentialId = credentialId
            self.friendlyCredentialName = friendlyCredentialName
            self.relyingPartyId = relyingPartyId
        }

        private enum CodingKeys: String, CodingKey {
            case authenticatorAttachment = "AuthenticatorAttachment"
            case authenticatorTransports = "AuthenticatorTransports"
            case createdAt = "CreatedAt"
            case credentialId = "CredentialId"
            case friendlyCredentialName = "FriendlyCredentialName"
            case relyingPartyId = "RelyingPartyId"
        }
    }
}

// MARK: - Errors

/// Error enum for CognitoIdentityProvider
public struct CognitoIdentityProviderErrorType: AWSErrorType {
    enum Code: String {
        case aliasExistsException = "AliasExistsException"
        case codeDeliveryFailureException = "CodeDeliveryFailureException"
        case codeMismatchException = "CodeMismatchException"
        case concurrentModificationException = "ConcurrentModificationException"
        case deviceKeyExistsException = "DeviceKeyExistsException"
        case duplicateProviderException = "DuplicateProviderException"
        case enableSoftwareTokenMFAException = "EnableSoftwareTokenMFAException"
        case expiredCodeException = "ExpiredCodeException"
        case featureUnavailableInTierException = "FeatureUnavailableInTierException"
        case forbiddenException = "ForbiddenException"
        case groupExistsException = "GroupExistsException"
        case internalErrorException = "InternalErrorException"
        case invalidEmailRoleAccessPolicyException = "InvalidEmailRoleAccessPolicyException"
        case invalidLambdaResponseException = "InvalidLambdaResponseException"
        case invalidOAuthFlowException = "InvalidOAuthFlowException"
        case invalidParameterException = "InvalidParameterException"
        case invalidPasswordException = "InvalidPasswordException"
        case invalidSmsRoleAccessPolicyException = "InvalidSmsRoleAccessPolicyException"
        case invalidSmsRoleTrustRelationshipException = "InvalidSmsRoleTrustRelationshipException"
        case invalidUserPoolConfigurationException = "InvalidUserPoolConfigurationException"
        case limitExceededException = "LimitExceededException"
        case managedLoginBrandingExistsException = "ManagedLoginBrandingExistsException"
        case mfaMethodNotFoundException = "MFAMethodNotFoundException"
        case notAuthorizedException = "NotAuthorizedException"
        case passwordHistoryPolicyViolationException = "PasswordHistoryPolicyViolationException"
        case passwordResetRequiredException = "PasswordResetRequiredException"
        case preconditionNotMetException = "PreconditionNotMetException"
        case refreshTokenReuseException = "RefreshTokenReuseException"
        case resourceNotFoundException = "ResourceNotFoundException"
        case scopeDoesNotExistException = "ScopeDoesNotExistException"
        case softwareTokenMFANotFoundException = "SoftwareTokenMFANotFoundException"
        case termsExistsException = "TermsExistsException"
        case tierChangeNotAllowedException = "TierChangeNotAllowedException"
        case tooManyFailedAttemptsException = "TooManyFailedAttemptsException"
        case tooManyRequestsException = "TooManyRequestsException"
        case unauthorizedException = "UnauthorizedException"
        case unexpectedLambdaException = "UnexpectedLambdaException"
        case unsupportedIdentityProviderException = "UnsupportedIdentityProviderException"
        case unsupportedOperationException = "UnsupportedOperationException"
        case unsupportedTokenTypeException = "UnsupportedTokenTypeException"
        case unsupportedUserStateException = "UnsupportedUserStateException"
        case userImportInProgressException = "UserImportInProgressException"
        case userLambdaValidationException = "UserLambdaValidationException"
        case userNotConfirmedException = "UserNotConfirmedException"
        case userNotFoundException = "UserNotFoundException"
        case userPoolAddOnNotEnabledException = "UserPoolAddOnNotEnabledException"
        case userPoolTaggingException = "UserPoolTaggingException"
        case usernameExistsException = "UsernameExistsException"
        case webAuthnChallengeNotFoundException = "WebAuthnChallengeNotFoundException"
        case webAuthnClientMismatchException = "WebAuthnClientMismatchException"
        case webAuthnConfigurationMissingException = "WebAuthnConfigurationMissingException"
        case webAuthnCredentialNotSupportedException = "WebAuthnCredentialNotSupportedException"
        case webAuthnNotEnabledException = "WebAuthnNotEnabledException"
        case webAuthnOriginNotAllowedException = "WebAuthnOriginNotAllowedException"
        case webAuthnRelyingPartyMismatchException = "WebAuthnRelyingPartyMismatchException"
    }

    private let error: Code
    public let context: AWSErrorContext?

    /// initialize CognitoIdentityProvider
    public init?(errorCode: String, context: AWSErrorContext) {
        guard let error = Code(rawValue: errorCode) else { return nil }
        self.error = error
        self.context = context
    }

    internal init(_ error: Code) {
        self.error = error
        self.context = nil
    }

    /// return error code string
    public var errorCode: String { self.error.rawValue }

    /// This exception is thrown when a user tries to confirm the account with an email address or phone number that has already been supplied as an alias for a different user profile. This exception indicates that an account with this email address or phone already exists in a user pool that you've configured to use email address or phone number as a sign-in alias.
    public static var aliasExistsException: Self { .init(.aliasExistsException) }
    /// This exception is thrown when a verification code fails to deliver successfully.
    public static var codeDeliveryFailureException: Self { .init(.codeDeliveryFailureException) }
    /// This exception is thrown if the provided code doesn't match what the server was expecting.
    public static var codeMismatchException: Self { .init(.codeMismatchException) }
    /// This exception is thrown if two or more modifications are happening concurrently.
    public static var concurrentModificationException: Self { .init(.concurrentModificationException) }
    /// This exception is thrown when a user attempts to confirm a device with a device key that already exists.
    public static var deviceKeyExistsException: Self { .init(.deviceKeyExistsException) }
    /// This exception is thrown when the provider is already supported by the user pool.
    public static var duplicateProviderException: Self { .init(.duplicateProviderException) }
    /// This exception is thrown when there is a code mismatch and the service fails to configure the software token TOTP multi-factor authentication (MFA).
    public static var enableSoftwareTokenMFAException: Self { .init(.enableSoftwareTokenMFAException) }
    /// This exception is thrown if a code has expired.
    public static var expiredCodeException: Self { .init(.expiredCodeException) }
    /// This exception is thrown when a feature you attempted to configure isn't available in your current feature plan.
    public static var featureUnavailableInTierException: Self { .init(.featureUnavailableInTierException) }
    /// This exception is thrown when WAF doesn't allow your request based on a web ACL that's associated with your user pool.
    public static var forbiddenException: Self { .init(.forbiddenException) }
    /// This exception is thrown when Amazon Cognito encounters a group that already exists in the user pool.
    public static var groupExistsException: Self { .init(.groupExistsException) }
    /// This exception is thrown when Amazon Cognito encounters an internal error.
    public static var internalErrorException: Self { .init(.internalErrorException) }
    /// This exception is thrown when Amazon Cognito isn't allowed to use your email identity. HTTP status code: 400.
    public static var invalidEmailRoleAccessPolicyException: Self { .init(.invalidEmailRoleAccessPolicyException) }
    /// This exception is thrown when Amazon Cognito encounters an invalid Lambda response.
    public static var invalidLambdaResponseException: Self { .init(.invalidLambdaResponseException) }
    /// This exception is thrown when the specified OAuth flow is not valid.
    public static var invalidOAuthFlowException: Self { .init(.invalidOAuthFlowException) }
    /// This exception is thrown when the Amazon Cognito service encounters an invalid parameter.
    public static var invalidParameterException: Self { .init(.invalidParameterException) }
    /// This exception is thrown when Amazon Cognito encounters an invalid password.
    public static var invalidPasswordException: Self { .init(.invalidPasswordException) }
    /// This exception is returned when the role provided for SMS configuration doesn't have permission to publish using Amazon SNS.
    public static var invalidSmsRoleAccessPolicyException: Self { .init(.invalidSmsRoleAccessPolicyException) }
    /// This exception is thrown when the trust relationship is not valid for the role provided for SMS configuration. This can happen if you don't trust cognito-idp.amazonaws.com or the external ID provided in the role does not match what is provided in the SMS configuration for the user pool.
    public static var invalidSmsRoleTrustRelationshipException: Self { .init(.invalidSmsRoleTrustRelationshipException) }
    /// This exception is thrown when the user pool configuration is not valid.
    public static var invalidUserPoolConfigurationException: Self { .init(.invalidUserPoolConfigurationException) }
    /// This exception is thrown when a user exceeds the limit for a requested Amazon Web Services resource.
    public static var limitExceededException: Self { .init(.limitExceededException) }
    /// This exception is thrown when you attempt to apply a managed login branding style to an app client that already has an assigned style.
    public static var managedLoginBrandingExistsException: Self { .init(.managedLoginBrandingExistsException) }
    /// This exception is thrown when Amazon Cognito can't find a multi-factor authentication (MFA) method.
    public static var mfaMethodNotFoundException: Self { .init(.mfaMethodNotFoundException) }
    /// This exception is thrown when a user isn't authorized.
    public static var notAuthorizedException: Self { .init(.notAuthorizedException) }
    /// The message returned when a user's new password matches a previous password and doesn't comply with the password-history policy.
    public static var passwordHistoryPolicyViolationException: Self { .init(.passwordHistoryPolicyViolationException) }
    /// This exception is thrown when a password reset is required.
    public static var passwordResetRequiredException: Self { .init(.passwordResetRequiredException) }
    /// This exception is thrown when a precondition is not met.
    public static var preconditionNotMetException: Self { .init(.preconditionNotMetException) }
    /// This exception is throw when your application requests token refresh with a refresh token that has been invalidated by refresh-token rotation.
    public static var refreshTokenReuseException: Self { .init(.refreshTokenReuseException) }
    /// This exception is thrown when the Amazon Cognito service can't find the requested resource.
    public static var resourceNotFoundException: Self { .init(.resourceNotFoundException) }
    /// This exception is thrown when the specified scope doesn't exist.
    public static var scopeDoesNotExistException: Self { .init(.scopeDoesNotExistException) }
    /// This exception is thrown when the software token time-based one-time password (TOTP) multi-factor authentication (MFA) isn't activated for the user pool.
    public static var softwareTokenMFANotFoundException: Self { .init(.softwareTokenMFANotFoundException) }
    /// Terms document names must be unique to the app client. This exception is thrown when you attempt to create terms documents with a duplicate TermsName.
    public static var termsExistsException: Self { .init(.termsExistsException) }
    /// This exception is thrown when you've attempted to change your feature plan but the operation isn't permitted.
    public static var tierChangeNotAllowedException: Self { .init(.tierChangeNotAllowedException) }
    /// This exception is thrown when the user has made too many failed attempts for a given action, such as sign-in.
    public static var tooManyFailedAttemptsException: Self { .init(.tooManyFailedAttemptsException) }
    /// This exception is thrown when the user has made too many requests for a given operation.
    public static var tooManyRequestsException: Self { .init(.tooManyRequestsException) }
    /// Exception that is thrown when the request isn't authorized. This can happen due to an invalid access token in the request.
    public static var unauthorizedException: Self { .init(.unauthorizedException) }
    /// This exception is thrown when Amazon Cognito encounters an unexpected exception with Lambda.
    public static var unexpectedLambdaException: Self { .init(.unexpectedLambdaException) }
    /// This exception is thrown when the specified identifier isn't supported.
    public static var unsupportedIdentityProviderException: Self { .init(.unsupportedIdentityProviderException) }
    /// Exception that is thrown when you attempt to perform an operation that isn't enabled for the user pool client.
    public static var unsupportedOperationException: Self { .init(.unsupportedOperationException) }
    /// Exception that is thrown when an unsupported token is passed to an operation.
    public static var unsupportedTokenTypeException: Self { .init(.unsupportedTokenTypeException) }
    /// The request failed because the user is in an unsupported state.
    public static var unsupportedUserStateException: Self { .init(.unsupportedUserStateException) }
    /// This exception is thrown when you're trying to modify a user pool while a user import job is in progress for that pool.
    public static var userImportInProgressException: Self { .init(.userImportInProgressException) }
    /// This exception is thrown when the Amazon Cognito service encounters a user validation exception with the Lambda service.
    public static var userLambdaValidationException: Self { .init(.userLambdaValidationException) }
    /// This exception is thrown when a user isn't confirmed successfully.
    public static var userNotConfirmedException: Self { .init(.userNotConfirmedException) }
    /// This exception is thrown when a user isn't found.
    public static var userNotFoundException: Self { .init(.userNotFoundException) }
    /// This exception is thrown when user pool add-ons aren't enabled.
    public static var userPoolAddOnNotEnabledException: Self { .init(.userPoolAddOnNotEnabledException) }
    /// This exception is thrown when a user pool tag can't be set or updated.
    public static var userPoolTaggingException: Self { .init(.userPoolTaggingException) }
    /// This exception is thrown when Amazon Cognito encounters a user name that already exists in the user pool.
    public static var usernameExistsException: Self { .init(.usernameExistsException) }
    /// This exception is thrown when the challenge from StartWebAuthn registration has expired.
    public static var webAuthnChallengeNotFoundException: Self { .init(.webAuthnChallengeNotFoundException) }
    /// This exception is thrown when the access token is for a different client than the one in the original StartWebAuthnRegistration request.
    public static var webAuthnClientMismatchException: Self { .init(.webAuthnClientMismatchException) }
    /// This exception is thrown when a user pool doesn't have a configured relying party id or a user pool domain.
    public static var webAuthnConfigurationMissingException: Self { .init(.webAuthnConfigurationMissingException) }
    /// This exception is thrown when a user presents passkey credentials from an unsupported device or provider.
    public static var webAuthnCredentialNotSupportedException: Self { .init(.webAuthnCredentialNotSupportedException) }
    /// This exception is thrown when the passkey feature isn't enabled for the user pool.
    public static var webAuthnNotEnabledException: Self { .init(.webAuthnNotEnabledException) }
    /// This exception is thrown when the passkey credential's registration origin does not align with the user pool relying party id.
    public static var webAuthnOriginNotAllowedException: Self { .init(.webAuthnOriginNotAllowedException) }
    /// This exception is thrown when the given passkey credential is associated with a different relying party ID than the user pool relying party ID.
    public static var webAuthnRelyingPartyMismatchException: Self { .init(.webAuthnRelyingPartyMismatchException) }
}

extension CognitoIdentityProviderErrorType: AWSServiceErrorType {
    public static let errorCodeMap: [String: AWSErrorShape.Type] = [
        "InvalidParameterException": CognitoIdentityProvider.InvalidParameterException.self
    ]
}

extension CognitoIdentityProviderErrorType: Equatable {
    public static func == (lhs: CognitoIdentityProviderErrorType, rhs: CognitoIdentityProviderErrorType) -> Bool {
        lhs.error == rhs.error
    }
}

extension CognitoIdentityProviderErrorType: CustomStringConvertible {
    public var description: String {
        return "\(self.error.rawValue): \(self.message ?? "")"
    }
}
